diff options
Diffstat (limited to 'test/Parser/cxx-template-argument.cpp')
-rw-r--r-- | test/Parser/cxx-template-argument.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Parser/cxx-template-argument.cpp b/test/Parser/cxx-template-argument.cpp new file mode 100644 index 0000000000..80389a07b0 --- /dev/null +++ b/test/Parser/cxx-template-argument.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +template<typename T> struct A {}; + +// Check for template argument lists followed by junk +// FIXME: The diagnostics here aren't great... +A<int+> int x; // expected-error {{expected '>'}} expected-error {{expected unqualified-id}} +A<int x; // expected-error {{expected '>'}} expected-error {{C++ requires a type specifier for all declarations}} + |