summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/class-template-spec.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-27 06:26:26 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-27 06:26:26 +0000
commitef6ab417c18fe68ae1f90d8a4d874f3cec90347b (patch)
tree7b8bcffec767ed0e94884a9984fb194b355b1baa /clang/test/SemaTemplate/class-template-spec.cpp
parentd169e6c28115e1e61b61cd656b3bf8b44c8531de (diff)
downloadbcm5719-llvm-ef6ab417c18fe68ae1f90d8a4d874f3cec90347b.tar.gz
bcm5719-llvm-ef6ab417c18fe68ae1f90d8a4d874f3cec90347b.zip
Only set the point of instantiation for an implicit or explicit
instantiation once we have committed to performing the instantiation. As part of this, make our makeshift template-instantiation location information suck slightly less. Fixes PR5264. llvm-svn: 85209
Diffstat (limited to 'clang/test/SemaTemplate/class-template-spec.cpp')
-rw-r--r--clang/test/SemaTemplate/class-template-spec.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/test/SemaTemplate/class-template-spec.cpp b/clang/test/SemaTemplate/class-template-spec.cpp
index e44115c748c..4cd43b469ae 100644
--- a/clang/test/SemaTemplate/class-template-spec.cpp
+++ b/clang/test/SemaTemplate/class-template-spec.cpp
@@ -20,8 +20,7 @@ int test_incomplete_specs(A<double, double> *a1,
A<double> *a2)
{
(void)a1->x; // expected-error{{incomplete definition of type 'A<double, double>'}}
- (void)a2->x; // expected-error{{implicit instantiation of undefined template 'struct A<double, int>'}} \
- // expected-note{{first required here}}
+ (void)a2->x; // expected-error{{implicit instantiation of undefined template 'struct A<double, int>'}}
}
typedef float FLOAT;
@@ -71,8 +70,7 @@ namespace N {
}
// Diagnose specialization errors
-struct A<double> { }; // expected-error{{template specialization requires 'template<>'}} \
- // expected-error{{after instantiation}}
+struct A<double> { }; // expected-error{{template specialization requires 'template<>'}}
template<> struct ::A<double>;
@@ -100,3 +98,9 @@ template<> struct N::B<char> {
int testf(int x) { return f(x); }
};
+// PR5264
+template <typename T> class Foo;
+Foo<int>* v;
+Foo<int>& F() { return *v; }
+template <typename T> class Foo {};
+Foo<int> x;
OpenPOWER on IntegriCloud