Fix a bad interaction between -Wtautological-overlap-compare and delayed
diagnostics which caused delayed diagnostics on dead paths to be emitted.
llvm-svn: 206232
diff --git a/clang/lib/Analysis/AnalysisDeclContext.cpp b/clang/lib/Analysis/AnalysisDeclContext.cpp
index c90d947..ef9ce56 100644
--- a/clang/lib/Analysis/AnalysisDeclContext.cpp
+++ b/clang/lib/Analysis/AnalysisDeclContext.cpp
@@ -189,6 +189,9 @@
if (PM)
addParentsForSyntheticStmts(cfg.get(), *PM);
+
+ // The Obersver should only observe one build of the CFG.
+ getCFGBuildOptions().Observer = 0;
}
return cfg.get();
}
@@ -205,6 +208,9 @@
if (PM)
addParentsForSyntheticStmts(completeCFG.get(), *PM);
+
+ // The Obersver should only observe one build of the CFG.
+ getCFGBuildOptions().Observer = 0;
}
return completeCFG.get();
}