summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-12 20:18:28 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-12 20:18:28 +0000
commit06db9f50a2d6db82335790213f653accc1da6cb7 (patch)
tree02db68020ca7c263eb2f0e92678214aa0072f686 /clang/test
parente7196431c19acf165314136a57a70ca597f596a3 (diff)
downloadbcm5719-llvm-06db9f50a2d6db82335790213f653accc1da6cb7.tar.gz
bcm5719-llvm-06db9f50a2d6db82335790213f653accc1da6cb7.zip
Diagnose the declaration of explicit specializations after an implicit
instantiation has already been required. To do so, keep track of the point of instantiation for anything that can be instantiated. llvm-svn: 83890
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaTemplate/class-template-spec.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/test/SemaTemplate/class-template-spec.cpp b/clang/test/SemaTemplate/class-template-spec.cpp
index 05ddb053259..e44115c748c 100644
--- a/clang/test/SemaTemplate/class-template-spec.cpp
+++ b/clang/test/SemaTemplate/class-template-spec.cpp
@@ -20,7 +20,8 @@ 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>'}}
+ (void)a2->x; // expected-error{{implicit instantiation of undefined template 'struct A<double, int>'}} \
+ // expected-note{{first required here}}
}
typedef float FLOAT;
@@ -70,7 +71,8 @@ namespace N {
}
// Diagnose specialization errors
-struct A<double> { }; // expected-error{{template specialization requires 'template<>'}}
+struct A<double> { }; // expected-error{{template specialization requires 'template<>'}} \
+ // expected-error{{after instantiation}}
template<> struct ::A<double>;
OpenPOWER on IntegriCloud