From: Ted Kremenek Date: Tue, 7 Apr 2009 00:11:40 +0000 (+0000) Subject: Don't overguard to adding a control-flow piece when "alwaysAdd" is true. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e97386fdd4e61375dff99be5c339705e89b66d9e;p=clang Don't overguard to adding a control-flow piece when "alwaysAdd" is true. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68476 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index c068b4b4df..b7a1cd90ac 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -914,7 +914,7 @@ void EdgeBuilder::addEdge(PathDiagnosticLocation NewLoc, bool alwaysAdd) { // Is the top location context the same as the one for the new location? if (TopContextLoc == CLoc) { - if (alwaysAdd && NewLoc.asLocation() != CLoc.asLocation()) + if (alwaysAdd) rawAddEdge(NewLoc); return; @@ -949,7 +949,7 @@ void EdgeBuilder::addContext(const Stmt *S) { return; if (containsLocation(TopContextLoc, L)) { - // if (const Stmt *S = L.asStmt()) + // / if (const Stmt *S = L.asStmt()) // if (isa(S)) // if (const Stmt *P = PDB.getParent(S)) // addContext(PDB.getEnclosingStmtLocation(P).asStmt());