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

LG!

It is an interesting idea to use this facility for `trackExpressionValue`. But 
I would expect such a mechanism to trigger quite often. I wonder if the memory 
consumption would increase significantly by storing a lambda for almost every 
binding for each path.
Right now we reclaim the memory after we finished analyzing a top-level 
function. If memory proves to be a problem, we could maybe reclaim memory for 
every non-buggy path analyzed? Of course, I prefer the simplicity of the 
current solution and hope that we never need to consider more complicated 
cleanup logic :)



================
Comment at: 
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:400
+
+  friend class Factory;
+  friend class TagVisitor;
----------------
Isn't this redundant?


================
Comment at: clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp:165
 
-  C.addTransition(C.getState()->set<ReleasedParameter>(PVD));
+  const NoteTag *T = C.getNoteTag([this, PVD](BugReport &BR) -> std::string {
+    if (&BR.getBugType() != &BT)
----------------
I am not very familiar with this check but wonder don't you miss an 
"isInteresting" check somewhere? Where do we filter the notes that are 
unrelated to the bug paths?


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

https://reviews.llvm.org/D58367



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

Reply via email to