[PATCH] [clang-tidy] Fix for Bug 23161

Alexander Kornienko alexfh at google.com
Thu Apr 9 06:55:05 PDT 2015


================
Comment at: clang-tidy/misc/StaticAssertCheck.cpp:31
@@ -30,2 +30,3 @@
   auto IsAlwaysFalse = ignoringParenImpCasts(
       anyOf(boolLiteral(equals(false)).bind("isAlwaysFalse"),
+            integerLiteral(equals(0)).bind("isAlwaysFalse"),
----------------
Maybe wrap `anyOf` in an `expr()` and use `.bind()` on it?

  ignoringParenImpCasts(
    expr(anyOf(...)).bind("isAlwaysFalse"));
  

================
Comment at: test/clang-tidy/misc-static-assert.cpp:18
@@ -17,1 +17,3 @@
 
+#define NULL 0
+
----------------
Will it work with a more common definition of NULL?

  #define NULL ((void*)0)

http://reviews.llvm.org/D8920

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






More information about the cfe-commits mailing list