This revision was automatically updated to reflect the committed changes.
Closed by commit rL276900: [Sema] Teach getCurrentThisType to reconize lambda
in in-class initializer (authored by epilk).
Changed prior to commit:
https://reviews.llvm.org/D21145?vs=60622=65779#toc
Repository:
rL
erik.pilkington added a comment.
Ping!
https://reviews.llvm.org/D21145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added a comment.
Pong!
http://reviews.llvm.org/D21145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added a comment.
Ping!
http://reviews.llvm.org/D21145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington added a comment.
Okay, thanks! I'll add the assert in.
@rsmith: Any thoughts on this?
http://reviews.llvm.org/D21145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erik.pilkington updated this revision to Diff 60622.
erik.pilkington added a comment.
This patch removes the handmade loop from `Sema::getCurrentThisType` instead
just using the result of `Sema::getFunctionLevelDeclContext`. I believe that
this will always give us the nearest `CXXRecordDecl`
faisalv added a comment.
Hmm - after having given this some more thought - I'm not as confident about
the best approach. Should we leverage the CXXThisTypeOverride mechanism (as
you had done in your initial patch) - and remove the computation entirely from
getCurrentThisType - or just remove
erik.pilkington updated this revision to Diff 60477.
erik.pilkington added a comment.
This new patch changes `Sema::getCurrentThisType` to recover the `this` type
when a lambda initializer is being transformed. This is done with the same code
as when instantiating a generic lambda initializer.
faisalv added inline comments.
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:3922
@@ -3920,1 +3921,3 @@
+ *this, Var->getDeclContext(),
+ /*NewThisContext=*/!isLambdaCallOperator(getCurLexicalContext()));
Init = SubstInitializer(OldVar->getInit(),
erik.pilkington created this revision.
erik.pilkington added reviewers: faisalv, rsmith, ahatanak.
erik.pilkington added a subscriber: cfe-commits.
Clang crashes during the instantiation of a lambda call operator where a
`VarDecl` is initialized with an expression that requires the `this` type
10 matches
Mail list logo