================ @@ -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">, ---------------- sdkrystian wrote:
> What if we skip complicated standardese altogether? > > > 'enum' keyword is not allowed after 'friend' keyword This isn't quite correct either because `enum` _can_ follow the `friend` keyword 😛, e.g. ```cpp enum class E; struct A { friend enum E f(); // ok }; ``` > Possibly followed by > > > Omit 'enum' keyword if you intend to befriend an enumeration I don't think a note would be particularly helpful since the friend declaration would be ignored anyways... 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