From c568e2f801a62e442cbbd823b71f70175715661f Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Tue, 21 Aug 2012 21:44:21 +0000 Subject: [analyzer] Set the default IPA mode to 'basic-inlining', which excludes C++. Under -analyzer-ipa=basic-inlining, only C functions, blocks, and C++ static member functions are inlined -- essentially, the calls that behave like simple C function calls. This is essentially the behavior in Xcode 4.4. C++ support still has some rough edges, and we don't want users to be worried about them if they download and run their own checker. (In particular, the massive number of false positives for analyzing LLVM comes from inlining defensively-written code in contexts where more aggressive assumptions are implicitly made. This problem is not unique to C++, but it is exacerbated by the higher proportion of code that lives in header files in C++.) The eventual goal is to be comfortable enough with C++ support (and simple Objective-C support) to advance to -analyzer-ipa=inlining as the default behavior. See the IPA design notes for more details. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162318 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInvocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Frontend/CompilerInvocation.cpp') diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 09e95ce693..95f9c38828 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -147,7 +147,7 @@ static void AnalyzerOptsToArgs(const AnalyzerOptions &Opts, ToArgsList &Res) { getAnalysisPurgeModeName(Opts.AnalysisPurgeOpt)); if (!Opts.AnalyzeSpecificFunction.empty()) Res.push_back("-analyze-function", Opts.AnalyzeSpecificFunction); - if (Opts.IPAMode != Inlining) + if (Opts.IPAMode != BasicInlining) Res.push_back("-analyzer-ipa", getAnalysisIPAModeName(Opts.IPAMode)); if (Opts.InliningMode != NoRedundancy) Res.push_back("-analyzer-inlining-mode", -- cgit v1.2.3-18-g5258