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

Alexander Kornienko alexfh at google.com
Thu Apr 9 08:26:58 PDT 2015


================
Comment at: clang-tidy/misc/StaticAssertCheck.cpp:34
@@ -33,1 +33,3 @@
+  auto IsAlwaysFalseWithCast = ignoringParenImpCasts(anyOf(IsAlwaysFalse,
+      cStyleCastExpr(hasDescendant(IsAlwaysFalse))));
   auto AssertExprRoot = anyOf(
----------------
I'd say that the cast should be restricted to T*. Also, `hasDescendant` may be to loose. Isn't `has` (or `has(ignoringParenImpCasts(...))` if needed) enough here?

http://reviews.llvm.org/D8920

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






More information about the cfe-commits mailing list