diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-04-02 00:26:15 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-04-02 00:26:15 +0000 |
commit | a12643622ad3b85972dfdd80fe9006a3e8d8fb80 (patch) | |
tree | 27a231ef368ee15f32966304f5c43742f520f293 /lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | |
parent | f12a25b55bee5ac1802c595b3014db091bbe635b (diff) |
[analyzer] Allow suppressing diagnostics reported within the 'std' namespace
This is controlled by the 'suppress-c++-stdlib' analyzer-config flag.
It is currently off by default.
This is more suppression than we'd like to do, since obviously there can
be user-caused issues within 'std', but it gives us the option to wield
a large hammer to suppress false positives the user likely can't work
around.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178513 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/AnalyzerOptions.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp index 65faa10134..465f408e7f 100644 --- a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp +++ b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp @@ -158,6 +158,12 @@ bool AnalyzerOptions::shouldSuppressInlinedDefensiveChecks() { /* Default = */ true); } +bool AnalyzerOptions::shouldSuppressFromCXXStandardLibrary() { + return getBooleanOption(SuppressFromCXXStandardLibrary, + "suppress-c++-stdlib", + /* Default = */ false); +} + int AnalyzerOptions::getOptionAsInteger(StringRef Name, int DefaultVal) { SmallString<10> StrBuf; llvm::raw_svector_ostream OS(StrBuf); |