summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/BugReporter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
index c63afc1411b..2b3b174f609 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -1847,6 +1847,8 @@ static bool optimizeEdges(PathPieces &path, SourceManager &SM,
const Stmt *level2 = getStmtParent(s1End, PM);
if (wasFirst) {
+ wasFirst = false;
+
// If the first edge (in isolation) is just a transition from
// an expression to a parent expression then eliminate that edge.
if (level1 && level2 && level2 == PM.getParent(level1)) {
OpenPOWER on IntegriCloud