[PATCH] D13488: [analyzer] Assume escape is possible through system functions taking void*

Devin Coughlin via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 6 18:15:03 PDT 2015


dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.

Has a typo but otherwise LGTM.


================
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:258
@@ +257,3 @@
+  /// the condition.
+  bool hasNonNullArgumentsWithType(bool (*Condition)(QualType)) const;
+
----------------
Did you consider using `std::function<bool(QualType)>` instead of a function pointer so that clients could use lambdas that capture to provide the condition?

================
Comment at: test/Analysis/Inputs/system-header-simulator.h:85
@@ -84,1 +84,3 @@
 
+// Some data strauctures may hold onto the pointer and free it later.
+void fake_insque(void *, void *);
----------------
Typo "strauctures"


http://reviews.llvm.org/D13488





More information about the cfe-commits mailing list