hanchenye-llvm-project/clang/lib/Analysis
Richard Smith c38498f046 PR23334: Perform semantic checking of lambda capture initialization in the right context.
Previously we'd try to perform checks on the captures from the middle of
parsing the lambda's body, at the point where we detected that a variable
needed to be captured. This was wrong in a number of subtle ways. In
PR23334, we couldn't correctly handle the list of potential odr-uses
resulting from the capture, and our attempt to recover from that resulted
in a use-after-free.

We now defer building the initialization expression until we leave the lambda
body and return to the enclosing context, where the initialization does the
right thing. This patch only covers lambda-expressions, but we should apply
the same change to blocks and captured statements too.

llvm-svn: 235921
2015-04-27 21:27:54 +00:00
..
AnalysisDeclContext.cpp Update APIs that return a pair of iterators to return an iterator_range instead. 2015-02-06 17:25:10 +00:00
BodyFarm.cpp [cleanup] Re-sort *all* #include lines with llvm/utils/sort_includes.py 2015-01-14 11:29:14 +00:00
BodyFarm.h Add support for the static analyzer to synthesize function implementations from external model files. 2014-08-27 15:14:15 +00:00
CFG.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:00:23 +00:00
CFGReachabilityAnalysis.cpp Rework CFG edges to encode potentially unreachable edges, instead of just making them NULL. 2014-02-27 00:24:00 +00:00
CFGStmtMap.cpp [C++11] Use 'nullptr'. Analysis edition. 2014-05-20 04:30:07 +00:00
CMakeLists.txt Reverting r214064 and r215650 while investigating a pesky performance regression 2014-09-23 08:34:41 +00:00
CallGraph.cpp [CallGraph] Make sure the edges are not missed due to re-declarations 2014-12-17 00:34:07 +00:00
CocoaConventions.cpp
CodeInjector.cpp [Analysis] Add missing newlines at end of file. 2014-10-09 20:34:45 +00:00
Consumed.cpp Fix for PR20402 in -Wconsumed. 2015-04-15 22:32:44 +00:00
Dominators.cpp
FormatString.cpp Add a format warning for "%p" with non-void* args 2015-03-04 03:12:10 +00:00
FormatStringParsing.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
LiveVariables.cpp Update APIs that return a pair of iterators to return an iterator_range instead. 2015-02-06 17:25:10 +00:00
Makefile
ObjCNoReturn.cpp
PostOrderCFGView.cpp Reverting r214064 and r215650 while investigating a pesky performance regression 2014-09-23 08:34:41 +00:00
PrintfFormatString.cpp Add support for analyzing FreeBSD kernel printf extensions. 2015-02-19 22:32:33 +00:00
ProgramPoint.cpp [analyzer] Improved checker naming in CFG dump. 2014-02-17 18:25:34 +00:00
PseudoConstantAnalysis.cpp [C++11] Use 'nullptr'. Analysis edition. 2014-05-20 04:30:07 +00:00
ReachableCode.cpp [cleanup] Re-sort *all* #include lines with llvm/utils/sort_includes.py 2015-01-14 11:29:14 +00:00
ScanfFormatString.cpp MS format strings: allow the 'h' length modifier with C, C, s and S (PR20808) 2014-09-04 21:39:52 +00:00
ThreadSafety.cpp Take the non-reference type when constructing a dummy expression. 2015-03-16 21:49:43 +00:00
ThreadSafetyCommon.cpp Hide away implementation details of the ThreadSafetyAnalysis in anonymous namespaces 2015-03-09 14:19:54 +00:00
ThreadSafetyLogical.cpp Fix line endings. 2014-05-28 11:19:43 +00:00
ThreadSafetyTIL.cpp Hide away implementation details of the ThreadSafetyAnalysis in anonymous namespaces 2015-03-09 14:19:54 +00:00
UninitializedValues.cpp PR23334: Perform semantic checking of lambda capture initialization in the right context. 2015-04-27 21:27:54 +00:00