diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-10-02 20:31:52 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-10-02 20:31:52 +0000 |
commit | 9e28fe60bbfa5de196ce4aa396210bf10fc5c266 (patch) | |
tree | 973dcf69ad1fc416bedba71cccc989e569820912 /lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | |
parent | 2a46533633441176e93b484739a0a27e07150b63 (diff) |
Change AnalyzerOptions::mayInlineCXXMemberFunction to default populate
the config string table. Also setup a test for dumping the analyzer
configuration for C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/AnalyzerOptions.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp index 7e6013bba8..bb1acb0ce8 100644 --- a/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp +++ b/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp @@ -19,19 +19,20 @@ using namespace clang; using namespace llvm; bool -AnalyzerOptions::mayInlineCXXMemberFunction(CXXInlineableMemberKind K) const { +AnalyzerOptions::mayInlineCXXMemberFunction(CXXInlineableMemberKind K) { if (IPAMode < Inlining) return false; if (!CXXMemberInliningMode) { static const char *ModeKey = "c++-inlining"; - std::string ModeStr = Config.lookup(ModeKey); + + StringRef ModeStr(Config.GetOrCreateValue(ModeKey, + "methods").getValue()); CXXInlineableMemberKind &MutableMode = const_cast<CXXInlineableMemberKind &>(CXXMemberInliningMode); MutableMode = llvm::StringSwitch<CXXInlineableMemberKind>(ModeStr) - .Case("", CIMK_MemberFunctions) .Case("constructors", CIMK_Constructors) .Case("destructors", CIMK_Destructors) .Case("none", CIMK_None) |