summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-26 00:02:51 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-26 00:02:51 +0000
commit8d0921617e21836bd40d88b1b850d4d4830cef10 (patch)
treed1fb7138d9113d95c357580e37bbd45092363605 /clang/test
parentd54dfb871882852c00e525bceef0b92fe945d40a (diff)
downloadbcm5719-llvm-8d0921617e21836bd40d88b1b850d4d4830cef10.tar.gz
bcm5719-llvm-8d0921617e21836bd40d88b1b850d4d4830cef10.zip
Use RecordFirst/RecordLast range checks in DeclContext
llvm-svn: 65489
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaTemplate/class-template-spec.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/clang/test/SemaTemplate/class-template-spec.cpp b/clang/test/SemaTemplate/class-template-spec.cpp
index 15c797a5daf..e4900838f11 100644
--- a/clang/test/SemaTemplate/class-template-spec.cpp
+++ b/clang/test/SemaTemplate/class-template-spec.cpp
@@ -37,11 +37,19 @@ template <> struct X<float> { int bar(); }; // #2
typedef int int_type;
void testme(X<int_type> *x1, X<float, int> *x2) {
- x1->foo(); // okay: refers to #1
- x2->bar(); // okay: refers to #2
+ (void)x1->foo(); // okay: refers to #1
+ (void)x2->bar(); // okay: refers to #2
}
-// Diagnose specializations in a different namespace
+// Make sure specializations are proper classes.
+template<>
+struct A<char> {
+ A();
+};
+
+A<char>::A() { }
+
+// Diagnose specialization errors
struct A<double> { }; // expected-error{{template specialization requires 'template<>'}}
template<typename T> // expected-error{{class template partial specialization is not yet supported}}
@@ -72,3 +80,4 @@ namespace M {
template<> struct N::B<char> {
int testf(int x) { return f(x); }
};
+
OpenPOWER on IntegriCloud