diff options
Diffstat (limited to 'lib/StaticAnalyzer/Core/AnalyzerOptions.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp index 04eb0ad97b..1ffd105766 100644 --- a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp +++ b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp @@ -90,6 +90,14 @@ bool AnalyzerOptions::mayInlineObjCMethod() const { return *ObjCInliningMode; } +bool AnalyzerOptions::shouldPruneNullReturnPaths() const { + if (!PruneNullReturnPaths.hasValue()) + const_cast<llvm::Optional<bool> &>(PruneNullReturnPaths) = + getBooleanOption("suppress-null-return-paths", /*Default=*/true); + + return *PruneNullReturnPaths; +} + int AnalyzerOptions::getOptionAsInteger(StringRef Name, int DefaultVal) const { std::string OptStr = Config.lookup(Name); if (OptStr.empty()) |