diff options
| author | John McCall <rjmccall@apple.com> | 2010-03-01 18:20:46 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-03-01 18:20:46 +0000 |
| commit | 8bc2a70dfede9c5fda23ff42b9442e7a76813fc5 (patch) | |
| tree | 692c7534327af8712e8965a8776d763ec4572273 /clang/test/Parser/cxx-decl.cpp | |
| parent | c3c3c6829f58e9cef3ce86bde909dc8d27e9976a (diff) | |
| download | bcm5719-llvm-8bc2a70dfede9c5fda23ff42b9442e7a76813fc5.tar.gz bcm5719-llvm-8bc2a70dfede9c5fda23ff42b9442e7a76813fc5.zip | |
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.
llvm-svn: 97462
Diffstat (limited to 'clang/test/Parser/cxx-decl.cpp')
| -rw-r--r-- | clang/test/Parser/cxx-decl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-decl.cpp b/clang/test/Parser/cxx-decl.cpp index f37604cc544..c8f2c0b7690 100644 --- a/clang/test/Parser/cxx-decl.cpp +++ b/clang/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}} |

