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
DS.SetTypeSpecError();
goto DoneWithDeclSpec;
}
+ if (Tok.is(tok::coloncolon)) // ::new or ::delete
+ goto DoneWithDeclSpec;
continue;
case tok::annot_cxxscope: {
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}}