зеркало из https://github.com/microsoft/clang-1.git
PR11148: Fix crash-on-invalid if an invalid member declaration is marked as
defaulted or deleted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
153221717e
Коммит
c430ef4f92
|
@ -66,6 +66,11 @@ Decl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS,
|
|||
if (Tok.is(tok::equal)) {
|
||||
ConsumeToken();
|
||||
|
||||
if (!FnD) {
|
||||
SkipUntil(tok::semi);
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Delete = false;
|
||||
SourceLocation KWLoc;
|
||||
if (Tok.is(tok::kw_delete)) {
|
||||
|
|
|
@ -13,3 +13,7 @@ struct foo {
|
|||
};
|
||||
|
||||
void baz() = delete;
|
||||
|
||||
struct quux {
|
||||
int quux() = default; // expected-error{{constructor cannot have a return type}} expected-error {{member 'quux' has the same name as its class}}
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче