From: Douglas Gregor Date: Tue, 7 Jun 2011 02:21:18 +0000 (+0000) Subject: Downgrade the warning about the use of typedefs for class template X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b01b8319012c6b568de6dfff935c1b16184952f;p=clang Downgrade the warning about the use of typedefs for class template specializations within an explicit instantiation to default to off (enabled by -pedantic). Nobody else seem to implement C++ [temp.explicit]p3. Fixes PR10093. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132704 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 54a094f68d..53372bb627 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -2047,7 +2047,7 @@ def note_explicit_instantiation_candidate : Note< "explicit instantiation candidate function template here %0">; def err_explicit_instantiation_inline : Error< "explicit instantiation cannot be 'inline'">; -def ext_explicit_instantiation_without_qualified_id : ExtWarn< +def ext_explicit_instantiation_without_qualified_id : Extension< "qualifier in explicit instantiation of %q0 requires a template-id " "(a typedef is not permitted)">; def err_explicit_instantiation_unqualified_wrong_namespace : Error< diff --git a/test/CXX/temp/temp.spec/temp.explicit/p2.cpp b/test/CXX/temp/temp.spec/temp.explicit/p2.cpp index 70d338b9f6..822f881712 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p2.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p2.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s // Example from the standard template class Array { void mf() { } }; @@ -35,7 +35,7 @@ namespace N { }; template - void f1(T) {}; // expected-note{{explicit instantiation refers here}} + void f1(T) {} // expected-note{{explicit instantiation refers here}} } using namespace N;