[PATCH] Sema for Captured Statements
Ben Langmuir
ben.langmuir at intel.com
Tue Mar 12 05:21:06 PDT 2013
Thanks for the review comments. Does the following division make sense to you?
CapturedDecl: wraps DeclContext and contains Captures and body statement
CapturedStmt: Contains CapturedStmtDecl, and CaptureInits
================
Comment at: lib/Sema/SemaExprCXX.cpp:739
@@ +738,3 @@
+
+ if (CapturedRegionScopeInfo *RSI
+ = dyn_cast<CapturedRegionScopeInfo>(FunctionScopes[idx])) {
----------------
Doug Gregor wrote:
> else if... ?
Will do.
================
Comment at: lib/Sema/SemaExprCXX.cpp:740
@@ +739,3 @@
+ if (CapturedRegionScopeInfo *RSI
+ = dyn_cast<CapturedRegionScopeInfo>(FunctionScopes[idx])) {
+ RecordDecl *RD = RSI->TheRecordDecl;
----------------
Doug Gregor wrote:
> Please indent the '=' an extra two spaces.
Will do.
================
Comment at: lib/Sema/SemaStmt.cpp:2312
@@ -2307,1 +2311,3 @@
+ }
+
// For blocks/lambdas with implicit return types, we check each return
----------------
Doug Gregor wrote:
> There's an if-else chain below (~line 2352) that checks block and lambda scopes. How about just extending those checks? HasImplicitReturnType will be false anyway.
Makes sense.
================
Comment at: lib/Sema/SemaStmt.cpp:2868
@@ +2867,3 @@
+
+ IdentifierInfo *Id = &PP.getIdentifierTable().get("capture");
+ RecordDecl *RD = 0;
----------------
Doug Gregor wrote:
> Please make the generated struct anonymous. We want no chance of it showing up anywhere.
Will do.
http://llvm-reviews.chandlerc.com/D433
More information about the cfe-commits
mailing list