[PATCH] Implement capturing for generic lambdas

Faisal Vali faisalv at yahoo.com
Sun Oct 27 18:25:43 PDT 2013


Hi rsmith, doug.gregor, eli.friedman,

This patch implements capturing for generic lambdas based on Richard and my discussion on core: thread starting at [c++std-core-23960]. 

Upon reviewing all our examples and test-cases one late night in chicago, [while (for better or for worse) narrowly avoiding being willfully lakosed ;)] Doug concurred with our intended semantics. 

Hopefully this should work...

Also included are some tests using basic init-captures.

This patch does not include:
  - making all visitors generic lambda aware.  
  - Also some sophisticated nested variadic expansions might not work.
 
Thanks!




http://llvm-reviews.chandlerc.com/D2035

Files:
  include/clang/AST/ASTLambda.h
  include/clang/Sema/ScopeInfo.h
  include/clang/Sema/Sema.h
  include/clang/Sema/SemaInternal.h
  include/clang/Sema/SemaLambda.h
  lib/Parse/ParseExpr.cpp
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaExprCXX.cpp
  lib/Sema/SemaExprMember.cpp
  lib/Sema/SemaLambda.cpp
  lib/Sema/TreeTransform.h
  test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp
  test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp
  test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp
  test/SemaCXX/cxx1y-generic-lambdas-capturing.cpp
  test/SemaCXX/cxx1y-generic-lambdas.cpp
  test/SemaCXX/lambda-expressions.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2035.1.patch
Type: text/x-patch
Size: 83359 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131027/5f8bed3d/attachment.bin>


More information about the cfe-commits mailing list