summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p12.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Improve diagnostics for invalid use of non-static members / this:Richard Smith2012-04-051-1/+1
| | | | | | | | | | | | * s/nonstatic/non-static/ in the diagnostics, since the latter form outvoted the former by 28-2 in our diagnostics. * Fix the "use of member in static member function" diagnostic to correctly detect this situation inside a block or lambda. * Produce a more specific "invalid use of non-static member" diagnostic for the case where a nested class member refers to a member of a lexically-surrounding class. llvm-svn: 154073
* Make the odr-use logic work correctly for constant-expressions. PR12006.Eli Friedman2012-02-291-3/+2
| | | | llvm-svn: 151699
* Within the body of a lambda expression, decltype((x)) for anDouglas Gregor2012-02-121-2/+2
| | | | | | | | | | | | | | | | id-expression 'x' will compute the type based on the assumption that 'x' will be captured, even if it isn't captured, per C++11 [expr.prim.lambda]p18. There are two related refactors that go into implementing this: 1) Split out the check that determines whether we should capture a particular variable reference, along with the computation of the type of the field, from the actual act of capturing the variable. 2) Always compute the result of decltype() within Sema, rather than AST, because the decltype() computation is now context-sensitive. llvm-svn: 150347
* Add test from [expr.prim.lambda]p12, which deals with odr-use andDouglas Gregor2012-02-101-0/+30
| | | | | | | | nested captures. We currently don't get odr-use correct in array bounds, so that bit is commented out while we sort out what we need to do. llvm-svn: 150255
* Add various tests for captures and the reaching scope of the lambdaDouglas Gregor2012-02-101-0/+48
expression. Implement C++11 [expr.prim.lambda]p12's requirement that capturing a variable will odr-use it. llvm-svn: 150237
OpenPOWER on IntegriCloud