return true; // FIXME: Check for C++0x scoped enums
else if (DeclKind == Decl::LinkageSpec)
return true;
- else if (DeclKind == Decl::Record || DeclKind == Decl::CXXRecord)
+ else if (DeclKind >= Decl::RecordFirst && DeclKind <= Decl::RecordLast)
return cast<RecordDecl>(this)->isAnonymousStructOrUnion();
else if (DeclKind == Decl::Namespace)
return false; // FIXME: Check for C++0x inline namespaces
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}}
template<> struct N::B<char> {
int testf(int x) { return f(x); }
};
+