summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/invalid-template-specifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/invalid-template-specifier.cpp')
-rw-r--r--clang/test/SemaCXX/invalid-template-specifier.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/invalid-template-specifier.cpp b/clang/test/SemaCXX/invalid-template-specifier.cpp
new file mode 100644
index 0000000..bcd6da7
--- /dev/null
+++ b/clang/test/SemaCXX/invalid-template-specifier.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only
+// PR4809
+// This test is primarily checking that this doesn't crash, not the particular
+// diagnostics.
+
+const template basic_istream<char>; // expected-error {{expected unqualified-id}}
+
+namespace S {}
+template <class X> class Y {
+ void x() { S::template y<char>(1); } // expected-error {{does not refer to a template}} \
+ // expected-error {{unqualified-id}}
+};