Szelethus added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp:27
 #include "llvm/Support/Casting.h"
+#include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
----------------
balazske wrote:
> Are these new includes needed?
Nope, you're right.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp:371
-  const Decl *D = Call.getDecl();
-  if (D && (isa<FunctionDecl>(D) || isa<BlockDecl>(D))) {
-    // If we have a function or block declaration, we can make sure we pass
----------------
@balazske this is the corresponding condition that got changed. Now, your 
inline is fair, and I remember being puzzled by needing that condition to not 
crash. One thing to note is that CallAndMessage really tests every part of 
CallEvent, and since its registered very early (its also a dependency in 
addition to being a core checker) it runs before most other checkers. Anyways, 
I revisited each of the new functions I added, and wow, you totally nailed it. 
Nothing crashes if I remove that condition, but I vividly remember it breaking 
earlier.

So yeah, nice catch!




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77846/new/

https://reviews.llvm.org/D77846



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to