[PATCH] D119609: [Clang][Sema] Prohibit expression statement in lambda default argument
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 16 05:03:38 PDT 2022
aaron.ballman added a comment.
In D119609#3384568 <https://reviews.llvm.org/D119609#3384568>, @junaire wrote:
> Hi @aaron.ballman @erichkeane, I have already left a comment in GCC's Bugzilla, but unfortunately there's been no response for almost a week. I'm even not sure there's really a bug fix for GCC or not. Can you guys decide how to deal with this issue?
Because statement expressions are a GCC extension that Clang tries to emulate, I'd feel most comfortable moving after the GCC devs make their decision. FWIW, the way I read that patch is there is some support for disabling in all default parameters for consistency reasons, and I could get behind that assuming it doesn't break significant code. I would recommend preparing your patch as if the GCC folks agree to disallow statement expressions as a default parameter in general, we can review that, and if GCC devs still haven't made a decision in a few weeks, I think we can land it. If GCC eventually decides to retain the feature for functions but not lambdas, we can re-evaluate whether we want to relax the restriction to match or not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119609/new/
https://reviews.llvm.org/D119609
More information about the cfe-commits
mailing list