Introduce support for template instantiation of lambda
expressions. This is mostly a simple refact, splitting the main "start a lambda expression" function into smaller chunks that are driven either from the parser (Sema::ActOnLambdaExpr) or during AST transformation (TreeTransform::TransformLambdaExpr). A few minor interesting points: - Added new entry points for TreeTransform, so that we can explicitly establish the link between the lambda closure type in the template and the lambda closure type in the instantiation. - Added a bit into LambdaExpr specifying whether it had an explicit result type or not. We should have had this anyway. This code is 'lightly' tested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150417 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/ExprCXX.h 10 additions, 0 deletionsinclude/clang/AST/ExprCXX.h
- include/clang/Sema/Sema.h 28 additions, 2 deletionsinclude/clang/Sema/Sema.h
- lib/AST/ExprCXX.cpp 5 additions, 2 deletionslib/AST/ExprCXX.cpp
- lib/AST/StmtPrinter.cpp 3 additions, 3 deletionslib/AST/StmtPrinter.cpp
- lib/Sema/SemaExpr.cpp 0 additions, 2 deletionslib/Sema/SemaExpr.cpp
- lib/Sema/SemaLambda.cpp 131 additions, 87 deletionslib/Sema/SemaLambda.cpp
- lib/Sema/SemaTemplate.cpp 5 additions, 0 deletionslib/Sema/SemaTemplate.cpp
- lib/Sema/SemaTemplateDeduction.cpp 5 additions, 0 deletionslib/Sema/SemaTemplateDeduction.cpp
- lib/Sema/SemaTemplateInstantiate.cpp 8 additions, 0 deletionslib/Sema/SemaTemplateInstantiate.cpp
- lib/Sema/TreeTransform.h 136 additions, 4 deletionslib/Sema/TreeTransform.h
- test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp 45 additions, 0 deletionstest/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp
Loading
Please register or sign in to comment