summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-10-02 20:31:52 +0000
committerTed Kremenek <kremenek@apple.com>2012-10-02 20:31:52 +0000
commit5faa5e04a36432f3187b9f4f0d9ac86d2aadad37 (patch)
tree822224fe9a0d6d3f1374a05a8277c284766c3724 /clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
parentde0ae1e406d4ab2f1a8b39d6d53bcf1f141a2104 (diff)
downloadbcm5719-llvm-5faa5e04a36432f3187b9f4f0d9ac86d2aadad37.tar.gz
bcm5719-llvm-5faa5e04a36432f3187b9f4f0d9ac86d2aadad37.zip
Change AnalyzerOptions::mayInlineCXXMemberFunction to default populate
the config string table. Also setup a test for dumping the analyzer configuration for C++. llvm-svn: 165040
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp b/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
index 7e6013bba8a..bb1acb0ce8f 100644
--- a/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud