[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
Fri May 20 04:34:37 PDT 2016


I'm also a huge advocate of simple composable interfaces that do the
'one' task that they are expected (i.e. named) to do - and do it well.
I thought about this some, but perhaps not exhaustively - and settled
on being ok with getCurThisType, always returning the correct type for
 'this' as typed/referred to in code (with the right 'cv' quals) -
regardless of where it is called from.  Nevertheless, I'm open to
suggestions if you have a better alternative candidate for where the
call to adjustCVQuals should go?

Thanks for thinking about this.

Faisal Vali



On Fri, May 20, 2016 at 1:33 AM, Taewook Oh <twoh at fb.com> wrote:
> twoh added a comment.
>
> @faisalv, thank you for the update. I wonder if getCurrentThisType() is the best place to call adjustCVQualifiersForCXXThisWithinLambda(). It seems that getCurrentThisType() does more than its name suggests. Is there any other place that the adjustment function can be called?
>
>
> http://reviews.llvm.org/D19783
>
>
>


More information about the cfe-commits mailing list