forked from OSchip/llvm-project
Move friend warning into CXX11 warning group.
Also, fix the wording to reflect this. llvm-svn: 187171
This commit is contained in:
parent
f33c0e3a5f
commit
602577569d
|
@ -859,7 +859,7 @@ def err_inline_namespace_mismatch : Error<
|
|||
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;
|
||||
|
|
|
@ -14,7 +14,7 @@ class A1 {
|
|||
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}}
|
||||
|
|
|
@ -18,9 +18,8 @@ This test serves two purposes:
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue