forked from OSchip/llvm-project
[Parse] Don't crash on ~A::{
Found by clang-fuzz. llvm-svn: 233492
This commit is contained in:
parent
8671028e95
commit
3012e59bc7
|
@ -2535,7 +2535,7 @@ bool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, bool EnteringContext,
|
|||
if (SS.isNotEmpty())
|
||||
ObjectType = ParsedType();
|
||||
if (Tok.isNot(tok::identifier) || NextToken().is(tok::coloncolon) ||
|
||||
SS.isInvalid()) {
|
||||
!SS.isSet()) {
|
||||
Diag(TildeLoc, diag::err_destructor_tilde_scope);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -159,6 +159,7 @@ namespace DtorErrors {
|
|||
~D::D() throw(X) {} // expected-error {{'~' in destructor name should be after nested name specifier}}
|
||||
|
||||
~Undeclared::Undeclared() {} // expected-error {{use of undeclared identifier 'Undeclared'}} expected-error {{'~' in destructor name should be after nested name specifier}}
|
||||
~Undeclared:: {} // expected-error {{expected identifier}} expected-error {{'~' in destructor name should be after nested name specifier}}
|
||||
|
||||
struct S {
|
||||
// For another struct's destructor, emit the same diagnostic like for
|
||||
|
|
Loading…
Reference in New Issue