def err_unexpected_friend : Error<
"friends can only be classes or functions">;
def ext_enum_friend : ExtWarn<
- "enumeration type %0 cannot be a friend">;
+ "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;
friend union A; // expected-error {{use of 'A' with tag type that does not match previous declaration}}
friend enum A; // expected-error {{use of 'A' with tag type that does not match previous declaration}}
- friend enum E; // expected-warning {{cannot be a friend}}
+ friend enum E; // expected-warning {{befriending enumeration type 'enum E' is a C++11 extension}}
};
template <class T> struct B { // expected-note {{previous use is here}}
The list of warnings below should NEVER grow. It should gradually shrink to 0.
-CHECK: Warnings without flags (136):
+CHECK: Warnings without flags (135):
CHECK-NEXT: ext_delete_void_ptr_operand
-CHECK-NEXT: ext_enum_friend
CHECK-NEXT: ext_expected_semi_decl_list
CHECK-NEXT: ext_explicit_specialization_storage_class
CHECK-NEXT: ext_implicit_lib_function_decl