// RUN: %clang_cc1 -fsyntax-only -verify %s
// Check that "::new" and "::delete" in member initializer list are diagnosed
// correctly and don't lead to infinite loop on parsing.
// Error: X() (initializer on non-constructor), "::new" is skipped.
void : ::new; // expected-error{{only constructors take base initializers}}
// Errors: first "::delete" and initializer on non-constructor, others skipped.
void : ::delete, ::new, ::new ::delete // expected-error{{expected class member or base class name}}
// expected-error@-1{{only constructors take base initializers}}
// Errors: the '::' token, "::delete" and initializer on non-constructor, others skipped.
void : ::, ::delete , ::new ; // expected-error2{{expected class member or base class name}}
// expected-error@-1{{only constructors take base initializers}}
;
;
;