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

Szabolcs Sipos szabolcs.sipos at ericsson.com
Thu Apr 9 12:44:00 PDT 2015


================
Comment at: clang-tidy/misc/StaticAssertCheck.cpp:84
@@ -77,3 +83,3 @@
   // False literal is not the result of macro expansion.
-  if (IsAlwaysFalse) {
+  if (IsAlwaysFalse && (!CastExpr || CastType.endswith("*"))) {
     SourceLocation FalseLiteralLoc =
----------------
alexfh wrote:
> Wait, doesn't `CastExpr->getType().isPointerType()` work?
I also searched for a method like this but QualType didn't have such and I haven't looked at Type.

http://reviews.llvm.org/D8920

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






More information about the cfe-commits mailing list