summaryrefslogtreecommitdiff
path: root/test/Parser
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-05-19 01:54:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-05-19 01:54:59 +0000
commit635020a50def2174b5b0dd3356f59cac53838f1f (patch)
tree3e3f475e190845ef80e328276a19ae258fa682ea /test/Parser
parent86fb5b7268f41cf895f7f36099c99d799d3dc004 (diff)
When a type-id is unexpectedly given a name, assume that the name is unrelated
syntax unless we have a reason to think otherwise. This improves error recovery in a couple of cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303398 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser')
-rw-r--r--test/Parser/cxx-template-argument.cpp2
-rw-r--r--test/Parser/cxx0x-decl.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/test/Parser/cxx-template-argument.cpp b/test/Parser/cxx-template-argument.cpp
index 9b8ca985dd..963356eaab 100644
--- a/test/Parser/cxx-template-argument.cpp
+++ b/test/Parser/cxx-template-argument.cpp
@@ -10,7 +10,7 @@ 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 {{type-id cannot have a name}} expected-error {{expected '>'}}
+A<int x; // expected-error {{expected '>'}}
// PR8912
template <bool> struct S {};
diff --git a/test/Parser/cxx0x-decl.cpp b/test/Parser/cxx0x-decl.cpp
index ba322a5894..2b253c019c 100644
--- a/test/Parser/cxx0x-decl.cpp
+++ b/test/Parser/cxx0x-decl.cpp
@@ -137,6 +137,9 @@ namespace AliasDeclEndLocation {
>\
> // expected-error {{expected ';' after alias declaration}}
;
+ using D = AliasDeclEndLocation::A<int
+ > // expected-error {{expected ';' after alias declaration}}
+ B something_else;
}
struct Base { virtual void f() = 0; virtual void g() = 0; virtual void h() = 0; };