[PATCH] fix false positives in clang-tidy macro parentheses checker

Alexander Kornienko alexfh at google.com
Tue Jun 23 03:50:37 PDT 2015


LG


================
Comment at: clang-tidy/misc/MacroParenthesesCheck.cpp:172
@@ -171,3 +171,3 @@
 
-    // Assignment.
-    if (Prev.is(tok::equal) && Next.is(tok::semi))
+    // Assignment/Return, i.e. '=x;' or 'return x;'.
+    if (Prev.isOneOf(tok::equal, tok::kw_return) && Next.is(tok::semi))
----------------
nit: "Assignment/return, i.e. '= x;' or 'return x;'.

http://reviews.llvm.org/D10644

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list