diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-06-07 02:21:18 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-06-07 02:21:18 +0000 |
| commit | 8a6d0e091b7156ef12a3a69810319edf5e89950e (patch) | |
| tree | 3a0a5411dc32203a5eba2dde4d3b14ee73f89b7b | |
| parent | 08b7a779ef7655dc1a80969482d10bdcda17680e (diff) | |
| download | bcm5719-llvm-8a6d0e091b7156ef12a3a69810319edf5e89950e.tar.gz bcm5719-llvm-8a6d0e091b7156ef12a3a69810319edf5e89950e.zip | |
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.
llvm-svn: 132704
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
| -rw-r--r-- | clang/test/CXX/temp/temp.spec/temp.explicit/p2.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 54a094f68d5..53372bb6273 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/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/clang/test/CXX/temp/temp.spec/temp.explicit/p2.cpp b/clang/test/CXX/temp/temp.spec/temp.explicit/p2.cpp index 70d338b9f64..822f8817121 100644 --- a/clang/test/CXX/temp/temp.spec/temp.explicit/p2.cpp +++ b/clang/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 T> class Array { void mf() { } }; @@ -35,7 +35,7 @@ namespace N { }; template<typename T> - void f1(T) {}; // expected-note{{explicit instantiation refers here}} + void f1(T) {} // expected-note{{explicit instantiation refers here}} } using namespace N; |

