[PATCH] D19783: Fix cv-qualification of '*this' captures (and nasty bug PR27507 introduced by commit 263921 "Implement Lambda Capture of *this by Value as [=, *this]")
Faisal Vali via cfe-commits
cfe-commits at lists.llvm.org
Sun May 1 20:39:08 PDT 2016
faisalv added a comment.
Is it too soon for a *ping* ;)
p.s. just added some comments.
================
Comment at: lib/Sema/SemaExprCXX.cpp:904
@@ +903,3 @@
+ for (int I = FunctionScopes.size();
+ I-- && dyn_cast<LambdaScopeInfo>(FunctionScopes[I]);
+ IsFirstIteration = false,
----------------
That dyn_cast should be an 'isa'
================
Comment at: lib/Sema/SemaExprCXX.cpp:1062
@@ -964,1 +1061,3 @@
+ Expr *This =
+ new (Context) CXXThisExpr(Loc, AdjustedThisTy, /*isImplicit*/ true);
if (ByCopy) {
----------------
Hmm - I wonder if instead of using AdjustedThisTy, I should always use 'ThisTy' since it is being used in the initializer expression, and should probably inherit its cv qualifiers from an enclosing lambda? correct?
http://reviews.llvm.org/D19783
More information about the cfe-commits
mailing list