[PATCH] Remove LambdaExpr and use Flag for IsGenericLambda

Faisal Vali faisalv at yahoo.com
Mon Oct 7 22:34:08 PDT 2013


Hi doug.gregor, rsmith, jdennett, eli.friedman,

Both Doug and Richard had asked me to remove the circular reference in CXXRecordDecl to LambdaExpr.

No change in functionality.  Doug had expressed preference that this be reviewed as a separate patch.

In addition, I have added an IsGenericLambda flag - this makes life easier when we implement capturing, and are Sema-analyzing the body of a lambda (and the calloperator hasn't been wired to the closure class yet), any inner lambdas can have potential captures that could require walking up the scope chain and checking if any generic lambdas are capture-ready.  This bit makes some of that checking easier.  If their is a strong dislike to adding this bit, I can try a little harder to see if there is any way to get around it.

Thanks!

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

Files:
  include/clang/AST/DeclCXX.h
  include/clang/Sema/Sema.h
  lib/AST/DeclCXX.cpp
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaLambda.cpp
  lib/Sema/TreeTransform.h
  lib/Serialization/ASTReaderDecl.cpp
  lib/Serialization/ASTWriter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1856.1.patch
Type: text/x-patch
Size: 18930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131007/9b6b5628/attachment.bin>


More information about the cfe-commits mailing list