From 7ee8906295d56ceb84b8b3da502cdc8770509868 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Sat, 26 Jan 2013 01:28:09 +0000 Subject: [PATCH] [analyzer] Rename PruneNullReturnPaths to SuppressNullReturnPaths. "Prune" is the term for eliminating pieces of a path that are not relevant to the user. "Suppress" means don't show that path at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173544 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/StaticAnalyzer/Core/AnalyzerOptions.h | 10 +++++----- lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | 4 ++-- lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h b/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h index 69b2ac4c0c..4643c67b70 100644 --- a/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h +++ b/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h @@ -211,12 +211,12 @@ private: // \sa getAlwaysInlineSize llvm::Optional AlwaysInlineSize; - /// \sa shouldPruneNullReturnPaths - llvm::Optional PruneNullReturnPaths; + /// \sa shouldSuppressNullReturnPaths + llvm::Optional SuppressNullReturnPaths; /// \sa shouldAvoidSuppressingNullArgumentPaths llvm::Optional AvoidSuppressingNullArgumentPaths; - + /// \sa getGraphTrimInterval llvm::Optional GraphTrimInterval; @@ -284,12 +284,12 @@ public: /// /// This is controlled by the 'suppress-null-return-paths' config option, /// which accepts the values "true" and "false". - bool shouldPruneNullReturnPaths(); + bool shouldSuppressNullReturnPaths(); /// Returns whether a bug report should \em not be suppressed if its path /// includes a call with a null argument, even if that call has a null return. /// - /// This option has no effect when #shouldPruneNullReturnPaths() is false. + /// This option has no effect when #shouldSuppressNullReturnPaths() is false. /// /// This is a counter-heuristic to avoid false negatives. /// diff --git a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp index c5a69aea5c..193e3b875d 100644 --- a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp +++ b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp @@ -140,8 +140,8 @@ bool AnalyzerOptions::mayInlineObjCMethod() { /* Default = */ true); } -bool AnalyzerOptions::shouldPruneNullReturnPaths() { - return getBooleanOption(PruneNullReturnPaths, +bool AnalyzerOptions::shouldSuppressNullReturnPaths() { + return getBooleanOption(SuppressNullReturnPaths, "suppress-null-return-paths", /* Default = */ true); } diff --git a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index f76dd57075..33c0ba8865 100644 --- a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -251,7 +251,7 @@ public: // the report is resurrected as valid later on. ExprEngine &Eng = BRC.getBugReporter().getEngine(); AnalyzerOptions &Options = Eng.getAnalysisManager().options; - if (Options.shouldPruneNullReturnPaths()) { + if (Options.shouldSuppressNullReturnPaths()) { if (hasCounterSuppression(Options)) Mode = MaybeSuppress; else -- 2.40.0