[PATCH] D28023: [analyzer] Fix leak false positives before no-return functions caused by incomplete analyses.

2016-12-22 Thread Phabricator via Phabricator via cfe-commits
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

[PATCH] D28023: [analyzer] Fix leak false positives before no-return functions caused by incomplete analyses.

2016-12-21 Thread Devin Coughlin via Phabricator via cfe-commits
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

[PATCH] D28023: [analyzer] Fix leak false positives before no-return functions caused by incomplete analyses.

2016-12-21 Thread Aleksei Sidorin via Phabricator via cfe-commits
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 ---

[PATCH] D28023: [analyzer] Fix leak false positives before no-return functions caused by incomplete analyses.

2016-12-21 Thread Aleksei Sidorin via Phabricator via cfe-commits
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

[PATCH] D28023: [analyzer] Fix leak false positives before no-return functions caused by incomplete analyses.

2016-12-21 Thread Artem Dergachev via Phabricator via cfe-commits
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