summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR23334: Perform semantic checking of lambda capture initialization in the ↵Richard Smith2015-04-271-3/+4
| | | | | | | | | | | | | | | | | | 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
* Adding a -Wunused-value warning for expressions with side effects used in an ↵Aaron Ballman2014-12-171-1/+1
| | | | | | unevaluated expression context, such as sizeof(), or decltype(). Also adds a similar warning when the expression passed to typeid() *is* evaluated, since it is equally likely that the user would expect the expression operand to be unevaluated in that case. llvm-svn: 224465
* sizeof(void) etc. should be a hard error in C++.Eli Friedman2013-08-131-1/+1
| | | | | | PR16872. llvm-svn: 188324
* Remove the "unsupported" error for lambda expressions. It's annoying,Douglas Gregor2012-02-091-13/+7
| | | | | | and rapidly becoming untrue. llvm-svn: 150165
* Implement C++ [expr.prim.lambda]p2, which bans lambda expressions inDouglas Gregor2012-02-091-0/+48
unevaluated operands. Be certain that we're marking everything referenced within a capture initializer as odr-used. llvm-svn: 150163
OpenPOWER on IntegriCloud