From aacad8685e3d873d15d7fc7974763655862477de Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Fri, 9 Aug 2019 14:53:29 +0300 Subject: checkpatch: Fix regexp for if, while, etc inside macros. This allows to use a one-character expression inside the 'if' statement and multiple spaces before the line continuation character. Fixes false positive in case like this: #define MACRO(ARG) \ if (a) { \ do_work(ARG); \ } Fixes: 16770c6d9179 ("checkpatch: support macro continuation") Signed-off-by: Ilya Maximets Acked-by: Aaron Conole --- tests/checkpatch.at | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/checkpatch.at') diff --git a/tests/checkpatch.at b/tests/checkpatch.at index f3b26dd34..fe21acdf2 100755 --- a/tests/checkpatch.at +++ b/tests/checkpatch.at @@ -230,6 +230,11 @@ try_checkpatch \ "COMMON_PATCH_HEADER + $ctr (first_run) { \\ " + +try_checkpatch \ + "COMMON_PATCH_HEADER + + $ctr (a) { \\ + " done AT_CLEANUP -- cgit v1.2.1