https://bugs.llvm.org/show_bug.cgi?id=52403
Aaron Ballman <aa...@aaronballman.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Aaron Ballman <aa...@aaronballman.com> ---
Oops, I jumped the gun on confirming this. Sorry for the confusion!
I think Clang is correct to reject this code. http://eel.is/c++draft/enum.udecl
says that the production needs to parse an elaborated-enum-specifier. One of
the requirements for a valid elaborated-enum-specifier is that the elaboration
has to agree in kind with the given declaration
(https://eel.is/c++draft/dcl.type.elab#6). In this case, the given declaration
is not an enum, it's a type alias.
You can see that all compilers agree that `enum Hog` is an invalid elaborated
type specifier outside of a using enum declaration:
https://godbolt.org/z/MY7PbqbhK
Because it's not a valid elaborated-type-specifier, I think GCC and MSVC are
incorrect to accept this code.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs