[PATCH] Implement capturing for generic lambdas

Faisal Vali faisalv at yahoo.com
Mon Nov 4 13:11:03 PST 2013


  - This patch was modified to build on the init-capturing tweak that i submitted.

  In addition the logic to identify constants in a dependent context for the purposes of speculative capturing by enclosing lambdas was modified.  e,g if we have :

      template<class T>
       void test(T t) {
         const T x = t; // we know this can never be a const
         ...
       }

  thanks!

Hi rsmith, doug.gregor, eli.friedman,

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

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D2035?vs=5188&id=5340#toc

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/Sema/SemaDecl.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaExprCXX.cpp
  lib/Sema/SemaExprMember.cpp
  lib/Sema/SemaLambda.cpp
  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.2.patch
Type: text/x-patch
Size: 83727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131104/21de4755/attachment.bin>


More information about the cfe-commits mailing list