aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/class-template-decl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-11-05 20:54:04 +0000
committerDouglas Gregor <dgregor@apple.com>2009-11-05 20:54:04 +0000
commitc7621a64717203e1f7d5d79dbf548e590b32596c (patch)
treec00547b72b11beae0460541242285aea6bc6b6b2 /test/SemaTemplate/class-template-decl.cpp
parenta6fda124bf380479529d6a80b84b62cacd3cb707 (diff)
Be a little more careful when trying to extract a TypeDecl from a enum/class/struct/union specifier; in invalid code, we may also see ClassTemplateDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/class-template-decl.cpp')
-rw-r--r--test/SemaTemplate/class-template-decl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/SemaTemplate/class-template-decl.cpp b/test/SemaTemplate/class-template-decl.cpp
index 8c717ea16e..a8163127b0 100644
--- a/test/SemaTemplate/class-template-decl.cpp
+++ b/test/SemaTemplate/class-template-decl.cpp
@@ -49,3 +49,5 @@ public:
void f() {
template<typename T> class X; // expected-error{{expression}}
}
+
+template<typename T> class X1 { } var; // expected-error{{declared as a template}}