summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLambda.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement the conversion to a function pointer for lambda expressions,Douglas Gregor2012-02-101-2/+49
| | | | | | per C++ [expr.prim.lambda]p6. llvm-svn: 150236
* Extend CXXRecordDecl with a function that determines the mapping fromDouglas Gregor2012-02-101-1/+2
| | | | | | | the variables captured by a lambda to the fields that store the captured values. To be used in IRgen. llvm-svn: 150235
* Implement return type deduction for lambdas per C++11Douglas Gregor2012-02-091-1/+46
| | | | | | | | | [expr.prim.lambda]p4, including the current suggested resolution of core isue 975, which allows multiple return statements so long as the types match. ExtWarn when user code is actually making use of this extension. llvm-svn: 150168
* Restore the appropriate lexical declaration context for a lambda'sDouglas Gregor2012-02-091-1/+3
| | | | | | | | | | | function call operator (to the lambda class). This allows us to IRgen calls to simple (non-capturing) lambdas, e.g., [](int i, int j) -> int { return i + j; }(1, 2) Eli will be providing test cases as he brings up more IRgen. llvm-svn: 150166
* Remove the "unsupported" error for lambda expressions. It's annoying,Douglas Gregor2012-02-091-2/+0
| | | | | | and rapidly becoming untrue. llvm-svn: 150165
* Implement C++ [expr.prim.lambda]p2, which bans lambda expressions inDouglas Gregor2012-02-091-3/+22
| | | | | | | unevaluated operands. Be certain that we're marking everything referenced within a capture initializer as odr-used. llvm-svn: 150163
* Don't complain about the lack of a constructor for a lambda expression. They ↵Douglas Gregor2012-02-091-1/+1
| | | | | | are constructed in different ways llvm-svn: 150136
* Along the error path for lambdas, mark the lambda class as invalid and ↵Douglas Gregor2012-02-091-0/+10
| | | | | | finalize it llvm-svn: 150130
* Various interrelated cleanups for lambdas:Douglas Gregor2012-02-091-9/+19
| | | | | | | | | | | | | | - Complete the lambda class when we finish the lambda expression (previously, it was left in the "being completed" state) - Actually return the LambdaExpr object and bind to the resulting temporary when needed. - Detect when cleanups are needed while capturing a variable into a lambda (e.g., due to default arguments in the copy constructor), and make sure those cleanups apply for the whole of the lambda expression. llvm-svn: 150123
* Factor C++11 lambda expressions implementation into a separateDouglas Gregor2012-02-081-0/+346
file. No functionality change. llvm-svn: 150089
OpenPOWER on IntegriCloud