aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-decl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-01 18:20:46 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-01 18:20:46 +0000
commit2e0a715595a21adeb7172995df59317741301aa3 (patch)
treee18d816abd992fc047d9f2ad22bce8419c0438d1 /test/Parser/cxx-decl.cpp
parentaac571c68de0a7c58d92fba0057e308f0e6d115c (diff)
Don't infinite-loop if TryAnnotateCXXScopeToken fails to annotate but doesn't
signal an error. This can happen even when the current token is '::' if this is a ::new or ::delete expression. This was an oversight in my recent parser refactor; fixes PR 5825. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-decl.cpp')
-rw-r--r--test/Parser/cxx-decl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp
index f37604cc54..c8f2c0b769 100644
--- a/test/Parser/cxx-decl.cpp
+++ b/test/Parser/cxx-decl.cpp
@@ -58,3 +58,7 @@ struct test4 {
int y;
int z // expected-error {{expected ';' at end of declaration list}}
};
+
+// PR5825
+struct test5 {};
+::new(static_cast<void*>(0)) test5; // expected-error {{expected unqualified-id}}