forked from OSchip/llvm-project
Issue diagnostic when objective-c's @interface is preceeded by a type specifier.
llvm-svn: 45491
This commit is contained in:
parent
796b64337b
commit
056e3a4e90
|
@ -379,6 +379,9 @@ Parser::DeclTy *Parser::ParseDeclarationOrFunctionDefinition() {
|
|||
SkipUntil(tok::semi); // FIXME: better skip?
|
||||
return 0;
|
||||
}
|
||||
const char *PrevSpec = 0;
|
||||
if (DS.SetTypeSpecType(DeclSpec::TST_unspecified, AtLoc, PrevSpec))
|
||||
Diag(AtLoc, diag::err_invalid_decl_spec_combination, PrevSpec);
|
||||
return ParseObjCAtInterfaceDeclaration(AtLoc, DS.getAttributes());
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
// RUN: clang -fsyntax-only -verify %s
|
||||
|
||||
int @interface bla ; // expected-error {{cannot combine with previous 'int' declaration specifier}}
|
||||
@end
|
Loading…
Reference in New Issue