aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Core')
-rw-r--r--lib/StaticAnalyzer/Core/AnalyzerOptions.cpp4
-rw-r--r--lib/StaticAnalyzer/Core/BugReporter.cpp3
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
index 193e3b875d..e2dedb4ac8 100644
--- a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
+++ b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
@@ -186,3 +186,7 @@ unsigned AnalyzerOptions::getMaxTimesInlineLarge() {
bool AnalyzerOptions::shouldSynthesizeBodies() {
return getBooleanOption("faux-bodies", true);
}
+
+bool AnalyzerOptions::shouldPrunePaths() {
+ return getBooleanOption("prune-paths", true);
+}
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp
index 38069a56ac..473472872b 100644
--- a/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -2123,7 +2123,8 @@ bool GRBugReporter::generatePathDiagnostic(PathDiagnostic& PD,
// Remove messages that are basically the same.
removeRedundantMsgs(PD.getMutablePieces());
- if (R->shouldPrunePath()) {
+ if (R->shouldPrunePath() &&
+ getEngine().getAnalysisManager().options.shouldPrunePaths()) {
bool hasSomethingInteresting = RemoveUnneededCalls(PD.getMutablePieces(),
R);
assert(hasSomethingInteresting);