diff options
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 8 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 4 | ||||
| -rw-r--r-- | clang/test/Misc/warning-flags.c | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 756f5a14d79..45ef7e30943 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -4043,14 +4043,16 @@ def err_partial_spec_args_match_primary_template : Error< "%select{class|variable}0 template partial specialization does not " "specialize any template argument; to %select{declare|define}1 the " "primary template, remove the template argument list">; -def err_partial_spec_not_more_specialized_than_primary : Error< +def ext_partial_spec_not_more_specialized_than_primary : ExtWarn< "%select{class|variable}0 template partial specialization is not " - "more specialized than the primary template">; + "more specialized than the primary template">, DefaultError, + InGroup<DiagGroup<"invalid-partial-specialization">>; def note_partial_spec_not_more_specialized_than_primary : Note<"%0">; def warn_partial_specs_not_deducible : Warning< "%select{class|variable}0 template partial specialization contains " "%select{a template parameter|template parameters}1 that cannot be " - "deduced; this partial specialization will never be used">; + "deduced; this partial specialization will never be used">, + InGroup<DiagGroup<"unusable-partial-specialization">>; def note_partial_spec_unused_parameter : Note< "non-deducible template parameter %0">; def err_partial_spec_ordering_ambiguous : Error< diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index b335e7e2602..5a3083ce3bc 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -2637,8 +2637,8 @@ static void checkMoreSpecializedThanPrimary(Sema &S, PartialSpecDecl *Partial) { auto *Template = Partial->getSpecializedTemplate(); S.Diag(Partial->getLocation(), - diag::err_partial_spec_not_more_specialized_than_primary) - << /*variable template*/isa<VarTemplateDecl>(Template); + diag::ext_partial_spec_not_more_specialized_than_primary) + << isa<VarTemplateDecl>(Template); if (Info.hasSFINAEDiagnostic()) { PartialDiagnosticAt Diag = {SourceLocation(), diff --git a/clang/test/Misc/warning-flags.c b/clang/test/Misc/warning-flags.c index 1a33265e4c2..be02e12e2cb 100644 --- a/clang/test/Misc/warning-flags.c +++ b/clang/test/Misc/warning-flags.c @@ -18,7 +18,7 @@ This test serves two purposes: The list of warnings below should NEVER grow. It should gradually shrink to 0. -CHECK: Warnings without flags (79): +CHECK: Warnings without flags (78): CHECK-NEXT: ext_excess_initializers CHECK-NEXT: ext_excess_initializers_in_char_array_initializer CHECK-NEXT: ext_expected_semi_decl_list @@ -78,7 +78,6 @@ CHECK-NEXT: warn_not_compound_assign CHECK-NEXT: warn_objc_property_copy_missing_on_block CHECK-NEXT: warn_objc_protocol_qualifier_missing_id CHECK-NEXT: warn_on_superclass_use -CHECK-NEXT: warn_partial_specs_not_deducible CHECK-NEXT: warn_pp_convert_to_positive CHECK-NEXT: warn_pp_expr_overflow CHECK-NEXT: warn_pp_line_decimal |

