llvm-project/clang/lib/Analysis
Jordan Rose c9176072e6 [analyzer] Add a CFG node for the allocator call in a C++ 'new' expression.
In an expression like "new (a, b) Foo(x, y)", two things happen:
- Memory is allocated by calling a function named 'operator new'.
- The memory is initialized using the constructor for 'Foo'.

Currently the analyzer only models the second event, though it has special
cases for both the default and placement forms of operator new. This patch
is the first step towards properly modeling both events: it changes the CFG
so that the above expression now generates the following elements.

1. a
2. b
3. (CFGNewAllocator)
4. x
5. y
6. Foo::Foo

The analyzer currently ignores the CFGNewAllocator element, but the next
step is to treat that as a call like any other.

The CFGNewAllocator element is not added to the CFG for analysis-based
warnings, since none of them take advantage of it yet.

llvm-svn: 199123
2014-01-13 17:59:19 +00:00
..
AnalysisDeclContext.cpp [analyzer] Add a CFG node for the allocator call in a C++ 'new' expression. 2014-01-13 17:59:19 +00:00
BodyFarm.cpp [analyzer] Model getters of known-@synthesized Objective-C properties. 2014-01-10 20:06:06 +00:00
BodyFarm.h [analyzer] Model getters of known-@synthesized Objective-C properties. 2014-01-10 20:06:06 +00:00
CFG.cpp [analyzer] Add a CFG node for the allocator call in a C++ 'new' expression. 2014-01-13 17:59:19 +00:00
CFGReachabilityAnalysis.cpp Use pop_back_val() instead of both back() and pop_back(). 2013-08-23 16:11:15 +00:00
CFGStmtMap.cpp Remove the CFGElement "Invalid" state. 2013-02-23 00:29:34 +00:00
CMakeLists.txt [CMake] clang/lib: Satisfy dependencies to add *actually used* libraries on target_link_libraries() and LLVM_LINK_COMPONENTS. 2013-12-09 19:04:43 +00:00
CallGraph.cpp [analyzer] Fix typos. 2012-12-21 17:27:04 +00:00
CocoaConventions.cpp Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h. 2013-02-08 22:30:41 +00:00
Consumed.cpp Sort all the #include lines with LLVM's utils/sort_includes.py which 2014-01-07 11:51:46 +00:00
Dominators.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
FormatString.cpp Analysis: Add support for MS specific printf format specifiers 2013-08-21 21:54:46 +00:00
FormatStringParsing.h Sort all of Clang's files under 'lib', and fix up the broken headers 2012-12-04 09:13:33 +00:00
LiveVariables.cpp Revert "[analyzer] Refactor conditional expression evaluating code" 2013-12-06 18:56:29 +00:00
Makefile
ObjCNoReturn.cpp clang/lib/Analysis/ObjCNoReturn.cpp: Fix [-Wnewline-eof] 2012-09-13 05:53:17 +00:00
PostOrderCFGView.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
PrintfFormatString.cpp Analysis: Make %I in printf more reasonable, add more tests 2013-08-22 07:53:21 +00:00
ProgramPoint.cpp [analyzer] Run remove dead bindings right before leaving a function. 2012-04-20 21:59:08 +00:00
PseudoConstantAnalysis.cpp Drop the ASTContext.h include from Stmt.h and fix up transitive users. 2012-07-04 17:04:04 +00:00
ReachableCode.cpp Make sort predicate match the qsort convention. 2013-09-22 15:02:02 +00:00
ScanfFormatString.cpp Analysis: Add support for MS specific printf format specifiers 2013-08-21 21:54:46 +00:00
ThreadSafety.cpp Switching getAttrs calls over to using a specific_attr_iterator. No functional changes intended. 2013-12-19 15:35:31 +00:00
UninitializedValues.cpp PR16054: Slight strengthening for -Wsometimes-uninitialized: if we use a 2013-09-12 18:49:10 +00:00