diff options
-rw-r--r-- | include/clang/Basic/DiagnosticGroups.td | 1 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 5 | ||||
-rw-r--r-- | test/SemaCXX/default-arg-special-member.cpp | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index cad4b5ef6a..9abd6d3c57 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -33,6 +33,7 @@ def : DiagGroup<"char-align">; def Comment : DiagGroup<"comment">; def : DiagGroup<"ctor-dtor-privacy">; def : DiagGroup<"declaration-after-statement">; +def DefaultArgSpecialMember : DiagGroup<"default-arg-special-member">; def GNUDesignator : DiagGroup<"gnu-designator">; def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor">; diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 33c3445d51..95f455f6e4 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -1416,11 +1416,12 @@ def err_uninitialized_member_in_ctor : Error< "the %select{reference|const}2 member %3">; def warn_default_arg_makes_ctor_special : Warning< "addition of default argument on redeclaration makes this constructor a " - "%select{default|copy|move}0 constructor">; + "%select{default|copy|move}0 constructor">, InGroup<DefaultArgSpecialMember>; def note_previous_declaration_special : Note< // The ERRORs are in hopes that if they occur, they'll get reported. "previous declaration was %select{*ERROR*|a copy constructor|a move " - "constructor|*ERROR*|*ERROR*|*ERROR*|not a special member function}0">; + "constructor|*ERROR*|*ERROR*|*ERROR*|not a special member function}0">, + InGroup<DefaultArgSpecialMember>; def err_use_of_default_argument_to_function_declared_later : Error< "use of default argument to function %0 that is declared later in class %1">; diff --git a/test/SemaCXX/default-arg-special-member.cpp b/test/SemaCXX/default-arg-special-member.cpp index aadbbeb2fc..015ea3d7f7 100644 --- a/test/SemaCXX/default-arg-special-member.cpp +++ b/test/SemaCXX/default-arg-special-member.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// RUM: %clang_cc1 -Wno-default-arg-special-member -Werror -fsyntax-only %s class foo { foo(foo&, int); // expected-note {{was not a special member function}} |