================
@@ -1637,10 +1637,8 @@ def err_inline_namespace_std : Error<
 def err_unexpected_friend : Error<
   "friends can only be classes or functions">;
 def ext_enum_friend : ExtWarn<
-  "befriending enumeration type %0 is a C++11 extension">, InGroup<CXX11>;
-def warn_cxx98_compat_enum_friend : Warning<
-  "befriending enumeration type %0 is incompatible with C++98">,
-  InGroup<CXX98Compat>, DefaultIgnore;
+  "elaborated enumeration type cannot be a friend">,
----------------
Endilll wrote:

> This isn't quite correct either because enum can follow the friend keyword 😛, 
> e.g.

Ugh, you are right. I think it even defeats your initial suggestions, which 
read `A friend declaration cannot use an elaborated type specifier starting 
with enum`, because it can when befriending a function, as you just showed. I 
guess no way around standardese then: `Elaborated type specifier cannot be used 
to befriend an enumeration. Consider omitting 'enum' keyword`. I'd like the 
wording to be accurate on terminology, yet actionable for users who are not 
well-versed in standardese.

https://github.com/llvm/llvm-project/pull/80171
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to