[PATCH] D53847: [C++2a] P0634r3: Down with typename!

Alan Zhao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 8 15:53:13 PDT 2022


ayzhao marked an inline comment as done.
ayzhao added inline comments.


================
Comment at: clang/lib/Parse/ParseDecl.cpp:4321
+             isCXXDeclarationSpecifier(ITC_Never, TPResult::True) !=
+                 TPResult::True) ||
+            (!getLangOpts().CPlusPlus && !isDeclarationSpecifier(ITC_Yes))) {
----------------
rsmith wrote:
> Rakete1111 wrote:
> > rsmith wrote:
> > > It seems like a wording oversight that we don't assume `typename` in an //enum-base//. Probably would be good to raise this on the core reflector.
> > Do you know why this isn't allowed in `operator` ids?
> There's already been discussion of that on the core reflector, and people seem to agree it's an oversight in the wording. If you want to accept that here, I think that's fine, under the assumption that this will be fixed by DR. (If you want to follow the wording-as-moved, that's fine too.)
> It seems like a wording oversight that we don't assume `typename` in an //enum-base//. Probably would be good to raise this on the core reflector.

Marking this as done for now; this patch currently returns an error if `typename` is assumed in an //enum-base//.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53847/new/

https://reviews.llvm.org/D53847



More information about the cfe-commits mailing list