summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/temp_explicit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-23 12:11:45 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-23 12:11:45 +0000
commit65911498eff34ac4fc2f9c250efd49aa51c35f85 (patch)
treea73627f3fa28d7456a843fe5dcbfb951490d2a11 /clang/test/SemaTemplate/temp_explicit.cpp
parent1c3feb5b25db1ff0c599b859b10397debf5b1744 (diff)
downloadbcm5719-llvm-65911498eff34ac4fc2f9c250efd49aa51c35f85.tar.gz
bcm5719-llvm-65911498eff34ac4fc2f9c250efd49aa51c35f85.zip
Tolerate extraneous "template<>" headers better, downgrading the
complaint to a warning and providing a helpful node in the case where the "template<>" header is redundant because the corresponding template-id refers to an explicit specialization. C++0x might still change this behavior, and existing practice is all over the place on the number of "template<>" headers actually needed. llvm-svn: 89651
Diffstat (limited to 'clang/test/SemaTemplate/temp_explicit.cpp')
-rw-r--r--clang/test/SemaTemplate/temp_explicit.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/temp_explicit.cpp b/clang/test/SemaTemplate/temp_explicit.cpp
index 9c824d6f414..ae409aff662 100644
--- a/clang/test/SemaTemplate/temp_explicit.cpp
+++ b/clang/test/SemaTemplate/temp_explicit.cpp
@@ -108,3 +108,20 @@ struct X6 {
};
template struct X6::Inner; // expected-error{{non-templated}}
+
+// PR5559
+template <typename T>
+struct Foo;
+
+template <>
+struct Foo<int> // expected-note{{header not required for explicitly-specialized}}
+{
+ template <typename U>
+ struct Bar
+ {};
+};
+
+template <> // expected-warning{{extraneous template parameter list}}
+template <>
+struct Foo<int>::Bar<void>
+{};
OpenPOWER on IntegriCloud