[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 9 05:49:33 PST 2018


xazax.hun accepted this revision.
xazax.hun added a comment.

LG!



================
Comment at: include/clang/Analysis/ProgramPoint.h:592
+  friend class ProgramPoint;
+  PostAllocatorCall() {}
+  static bool isKind(const ProgramPoint &Location) {
----------------
Maybe `= default` is getting more canonical within LLVM? But that would not match the rest of the file, so I am fine with not touching this. 


================
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:2907
+        else if (Loc.getAs<PostAllocatorCall>())
+          Out << "\\lPostAllocatorCall\\l";
 
----------------
I think this is fine for now, but I wonder if in the future it would make more sense to have a getName or similar method for ProgramPoints. 


Repository:
  rC Clang

https://reviews.llvm.org/D41800





More information about the cfe-commits mailing list