This revision was automatically updated to reflect the committed changes.
Closed by commit rL290341: [analyzer] Improve suppress-on-sink behavior in
incomplete analyses. (authored by dergachev).
Changed prior to commit:
https://reviews.llvm.org/D28023?vs=82229&id=82339#toc
Repository:
rL LLV
dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
With the change Aleksei suggested (can you get the CFGStmtMap from the
AnalysisDeclContext?), looks good to me.
I especially like the test!
Comment at: lib/StaticAnal
a.sidorin added inline comments.
Comment at: lib/StaticAnalyzer/Core/BugReporter.cpp:3363
+// we're post-dominated by.
+// FIXME: This is far from enough to handle the incomplete analysis case.
+// We may be post-dominated in subsequent blocks, or even
---
a.sidorin added a comment.
Looks useful and mostly good. A small advice is in inline comments.
Comment at: lib/StaticAnalyzer/Core/BugReporter.cpp:3294
+ // Find the node's current statement in the CFG.
+ // FIXME: CFG lookup should be made easier.
+ const CFG &Cfg = N->getC
NoQ created this revision.
NoQ added reviewers: zaks.anna, dcoughlin, xazax.hun, a.sidorin.
NoQ added a subscriber: cfe-commits.
Consider an example:
void foo(int y) {
void *x = malloc(1);
assert(y); // macro that expands to "if (!y) exit(1);"
free(x);
}
In CFG block correspondin