From d7c1aaa6c50d77522eda5510b20c9b628764c2d1 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 7 Apr 2009 00:11:40 +0000 Subject: [PATCH] Don't overguard to adding a control-flow piece when "alwaysAdd" is true. llvm-svn: 68476 --- clang/lib/Analysis/BugReporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp index c068b4b4df84..b7a1cd90ac34 100644 --- a/clang/lib/Analysis/BugReporter.cpp +++ b/clang/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());