[cfe-commits] r70917 - /cfe/branches/Apple/Dib/lib/Analysis/BugReporter.cpp
Mike Stump
mrs at apple.com
Mon May 4 14:43:17 PDT 2009
Author: mrs
Date: Mon May 4 16:43:17 2009
New Revision: 70917
URL: http://llvm.org/viewvc/llvm-project?rev=70917&view=rev
Log:
Merge in 70887:
BugReporter (extensive diagnostics): don't mark location contexts that are
control-flow expressions as dead.
Modified:
cfe/branches/Apple/Dib/lib/Analysis/BugReporter.cpp
Modified: cfe/branches/Apple/Dib/lib/Analysis/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/Analysis/BugReporter.cpp?rev=70917&r1=70916&r2=70917&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/lib/Analysis/BugReporter.cpp (original)
+++ cfe/branches/Apple/Dib/lib/Analysis/BugReporter.cpp Mon May 4 16:43:17 2009
@@ -955,7 +955,8 @@
// Is the top location context the same as the one for the new location?
if (TopContextLoc == CLoc) {
if (alwaysAdd) {
- if (IsConsumedExpr(TopContextLoc))
+ if (IsConsumedExpr(TopContextLoc) &&
+ !IsControlFlowExpr(TopContextLoc.asStmt()))
TopContextLoc.markDead();
rawAddEdge(NewLoc);
@@ -968,7 +969,7 @@
if (alwaysAdd) {
rawAddEdge(NewLoc);
- if (IsConsumedExpr(CLoc)) {
+ if (IsConsumedExpr(CLoc) && !IsControlFlowExpr(CLoc.asStmt())) {
CLocs.push_back(ContextLocation(CLoc, true));
return;
}
More information about the cfe-commits
mailing list