Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-07-27 Thread Phabricator via cfe-commits
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

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-07-20 Thread Erik Pilkington via cfe-commits
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

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-07-13 Thread Erik Pilkington via 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

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-07-05 Thread Erik Pilkington via 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

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-06-28 Thread Erik Pilkington via 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

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-06-13 Thread Erik Pilkington via 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`

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-06-12 Thread Faisal Vali via cfe-commits
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

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-06-12 Thread Erik Pilkington via cfe-commits
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.

Re: [PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-06-11 Thread Faisal Vali via cfe-commits
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(),

[PATCH] D21145: [Sema] Fix crash on valid where instantiation of lambda cannot access type of 'this'

2016-06-08 Thread Erik Pilkington via cfe-commits
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