[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 21 12:26:23 PDT 2022
cor3ntin added a comment.
In D119136#3465403 <https://reviews.llvm.org/D119136#3465403>, @rsmith wrote:
> In D119136#3463888 <https://reviews.llvm.org/D119136#3463888>, @cor3ntin wrote:
>> @rsmith @aaron.ballman Do you think it's worth resubmitting this patch with a look ahead of the `mutable` keyword (this seems to me a better strategy than other flimsy workaround suggested/tried), or would you rather wait for WG21 to come up with something?
> To directly answer your question: I'd want a reasonably strong signal from WG21 that that's the direction they want to pursue before we implement something like that, especially because it changes the meaning of some constructs while leaving them valid, which will create some churn for people living at head especially if we then roll that change back again. (I think we did have a strong enough signal to early-adopt the `decltype(id)` handling.)
I'll wait then, there are enough subtlety as it is, having different behavior in different language modes is not something i can commit time to at the moment (and one of the reason I was hoping we would still get this paper as a DR).
It's certainly doable - in particular getting everything before the end of the parameter declaration to behave as currently is trivial, but getting lookup in trailing return type etc to behave differently in different language mode would require some massaging.
I would also be concerned that putting that behind a flag would not give us meaningful data, so i don't know how useful it would be.
I was hoping to have some kind of implementation experience with look ahead as it's the most palatable fix, in my opinion, but it doesn't seem to be the one likely to be considered.
So I might implement it so that we can show that it's implementable, but no reason to attempt to upstream it - except that we won't get usage experience, nor will we know the extent of the breakage with CWG2569 applied
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits