summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-08-21 21:44:21 +0000
committerJordan Rose <jordan_rose@apple.com>2012-08-21 21:44:21 +0000
commite3e95cdf272b03ddaf635e0c0c7102e7643859c1 (patch)
tree760f39c8d12ffcb18a7a6017c89e474a49ba8944 /clang/lib/Frontend/CompilerInvocation.cpp
parent4d9fbd7ec4db0d47995949c9f3b4bc27830a0c78 (diff)
downloadbcm5719-llvm-e3e95cdf272b03ddaf635e0c0c7102e7643859c1.tar.gz
bcm5719-llvm-e3e95cdf272b03ddaf635e0c0c7102e7643859c1.zip
[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. llvm-svn: 162318
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 09e95ce6939..95f9c388283 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/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",
OpenPOWER on IntegriCloud