/// This is controlled by the 'c++-inlining' config option.
///
/// \sa CXXMemberInliningMode
- bool mayInlineCXXMemberFunction(CXXInlineableMemberKind K) const;
+ bool mayInlineCXXMemberFunction(CXXInlineableMemberKind K);
/// Returns true if ObjectiveC inlining is enabled, false otherwise.
bool mayInlineObjCMethod();
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)
--- /dev/null
+// RUN: %clang --analyze %s -o /dev/null -Xclang -analyzer-checker=debug.ConfigDumper > %t 2>&1
+// RUN: FileCheck --input-file=%t %s
+
+void bar() {}
+void foo() { bar(); }
+
+class Foo {
+public:
+ void bar() {}
+ void foo() { bar(); }
+};
+
+// CHECK: [config]
+// CHECK-NEXT: c++-inlining = methods
+// CHECK-NEXT: c++-stdlib-inlining = true
+// CHECK-NEXT: c++-template-inlining = true
+// CHECK-NEXT: cfg-temporary-dtors = false
+// CHECK-NEXT: faux-bodies = true
+// CHECK-NEXT: [stats]
+// CHECK-NEXT: num-entries = 5