summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-15 22:53:21 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-15 22:53:21 +0000
commit12e49d3250f62c69ba48534add9e9ab0aa3f2a1f (patch)
treee63c28b03b6f20c4012bff24ce23cd96554dbda7 /clang/test
parenta6149156328bc6075779518d623ba0d060b45138 (diff)
downloadbcm5719-llvm-12e49d3250f62c69ba48534add9e9ab0aa3f2a1f.tar.gz
bcm5719-llvm-12e49d3250f62c69ba48534add9e9ab0aa3f2a1f.zip
Make the remaining explicit-instantiation semantic action use
CheckSpecializationInstantiationRedecl to check for redeclarations/instantiations. Also fixes a longstanding issue where our explicit-instantiation location information wasn't as good as it could have been. llvm-svn: 84216
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaTemplate/extern-templates.cpp6
-rw-r--r--clang/test/SemaTemplate/variadic-class-template-2.cpp2
2 files changed, 3 insertions, 5 deletions
diff --git a/clang/test/SemaTemplate/extern-templates.cpp b/clang/test/SemaTemplate/extern-templates.cpp
index 28fda1a11e6..44728d188a2 100644
--- a/clang/test/SemaTemplate/extern-templates.cpp
+++ b/clang/test/SemaTemplate/extern-templates.cpp
@@ -29,16 +29,14 @@ void test_intptr(X0<int*> xi, X0<int*>::Inner xii) {
xii.g(0);
}
-// FIXME: we would like the notes to point to the explicit instantiation at the
-// bottom.
-extern template class X0<long*>; // expected-note 2{{instantiation}}
+extern template class X0<long*>;
void test_longptr(X0<long*> xl, X0<long*>::Inner xli) {
xl.f(0);
xli.g(0);
}
-template class X0<long*>;
+template class X0<long*>; // expected-note 2{{instantiation}}
template<typename T>
class X1 {
diff --git a/clang/test/SemaTemplate/variadic-class-template-2.cpp b/clang/test/SemaTemplate/variadic-class-template-2.cpp
index eadea901c7f..b1ac71b88bd 100644
--- a/clang/test/SemaTemplate/variadic-class-template-2.cpp
+++ b/clang/test/SemaTemplate/variadic-class-template-2.cpp
@@ -14,6 +14,6 @@ template struct TS2<int, int>;
template <typename = int, typename ...> struct TS3 {}; // expected-note{{template parameter is declared here}}
template struct TS3<>; // expected-note{{previous explicit instantiation is here}}
-template struct TS3<int>; // expected-error{{duplicate explicit instantiation of 'TS3<>'}}
+template struct TS3<int>; // expected-error{{duplicate explicit instantiation of 'TS3}}
template struct TS3<int, int>;
template struct TS3<10>; // expected-error{{template argument for template type parameter must be a type}}
OpenPOWER on IntegriCloud