]> granicus.if.org Git - clang/commit
[analyzer] Set the default IPA mode to 'basic-inlining', which excludes C++.
authorJordan Rose <jordan_rose@apple.com>
Tue, 21 Aug 2012 21:44:21 +0000 (21:44 +0000)
committerJordan Rose <jordan_rose@apple.com>
Tue, 21 Aug 2012 21:44:21 +0000 (21:44 +0000)
commitc568e2f801a62e442cbbd823b71f70175715661f
tree003b85c5413608402681a8e392fd40466acb6558
parentee04959f88e26ed38dccf4aed2ff10cad1f703c9
[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
docs/analyzer/IPA.txt
include/clang/Frontend/Analyses.def
include/clang/Frontend/AnalyzerOptions.h
lib/Frontend/CompilerInvocation.cpp
lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp