================
@@ -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:

I can't say I particularly like any of the three ideas suggested:
> A friend enumeration type cannot be declared using an elaborated type 
> specifier
> An elaborated type specifier starting with 'enum' cannot be declared as a 
> friend

I find both not too actionable for people out of the loop on the Standard. 
Among those two options, I prefer the latter.

> ISO C++ does not permits this declaration to be declared as friend because 
> 'enum E' is an elaborated specifier.

This is somewhat better, but isn't there an implication that elaborated type 
specifiers are not permitted in friend declarations?

> should we leave the current wording for the time being?

Sorry, I don't find the current wording `elaborated enumeration type cannot be 
a friend` acceptable.

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