[clang] No longer add enumeration constants to the wrong scope (PR #134998)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 9 09:39:01 PDT 2025
AaronBallman wrote:
> > > I thought CWG's preferred direction on this was to reject entirely?
> >
> >
> > What do they wish to reject? Defining an enum in a different declaration context than its primary context? That seems odd.
> > Do you have an idea of the CWG DR? We looked but couldn't find anything that looked like it.
>
> [CWG1485](https://cplusplus.github.io/CWG/issues/1485.html): "CWG agreed that an unscoped opaque enumeration in class scope should be forbidden."
Thank you for this! What are the chances that CWG changes their stance given that zero implementations implement that direction 13 years later? https://godbolt.org/z/h5Ys9shcn
I'd be a bit concerned with how much code we might break at this point if we turned that into an error.
https://github.com/llvm/llvm-project/pull/134998
More information about the cfe-commits
mailing list