llvm-project/clang/test/CXX
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
..
basic [Sema] Don't crash if array bound calculation overflowed constexpr array 2015-04-18 04:55:51 +00:00
class Don't crash if a declarator in a friend decl doesn't have a name. 2015-01-16 19:34:13 +00:00
class.access Add a new flag, -fspell-checking-limit=<number> to control how many times we'll do spell checking. Note that spell checking will change the produced AST, so we don't automatically change this value when someone sets -ferror-limit=. With this, merge test typo-correction-pt2.cpp into typo-correction.cpp. 2014-12-16 21:39:02 +00:00
class.derived PR6037 2015-01-19 01:44:02 +00:00
conv PR6037 2015-01-19 01:44:02 +00:00
dcl.dcl Move fixit for const init from note to diag, weaken to warning in MS mode. 2015-04-17 08:32:38 +00:00
dcl.decl Move fixit for const init from note to diag, weaken to warning in MS mode. 2015-04-17 08:32:38 +00:00
drs Move fixit for const init from note to diag, weaken to warning in MS mode. 2015-04-17 08:32:38 +00:00
except Emit DeferredDeclsToEmit in a DFS order. 2015-01-22 00:24:57 +00:00
expr PR23334: Perform semantic checking of lambda capture initialization in the right context. 2015-04-27 21:27:54 +00:00
lex Add driver flags -ftrigraphs, -fno-trigraphs. 2014-12-23 22:32:37 +00:00
over Implement [over.match.oper]p3 properly, by filtering the non-candidates out 2014-04-17 01:52:14 +00:00
special Unify warnings/errors from "maybe you meant" to "did you mean". 2015-04-02 22:10:06 +00:00
stmt.stmt Sema: Allow 'constexpr' variables in range loops 2015-02-18 18:34:59 +00:00
temp Improve the error message for assigning to read-only variables. 2015-04-11 01:53:13 +00:00