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 | 2e0a715595a21adeb7172995df59317741301aa3 (patch) | |
tree | e18d816abd992fc047d9f2ad22bce8419c0438d1 /lib/Parse/ParseDecl.cpp | |
parent | aac571c68de0a7c58d92fba0057e308f0e6d115c (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 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 277d69f2cd..4405dcb974 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -865,6 +865,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, DS.SetTypeSpecError(); goto DoneWithDeclSpec; } + if (Tok.is(tok::coloncolon)) // ::new or ::delete + goto DoneWithDeclSpec; continue; case tok::annot_cxxscope: { |