[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 6 09:24:12 PST 2024
================
@@ -107,6 +107,7 @@ namespace dr1638 { // dr1638: 3.1
struct B {
friend enum class A<unsigned>::E;
// since-cxx11-error at -1 {{reference to enumeration must use 'enum' not 'enum class'}}
+ // since-cxx11-error at -2 {{cannot be a friend}}
----------------
Endilll wrote:
Can you match the whole diagnostic message, like the rest of the tests in the file?
https://github.com/llvm/llvm-project/pull/80171
More information about the cfe-commits
mailing list