Fix a -pedantic spurious warning involving @dynamic.

llvm-svn: 101284
This commit is contained in:
Fariborz Jahanian 2010-04-14 20:52:42 +00:00
parent 33c46fde07
commit b5795c01c4
2 changed files with 21 additions and 1 deletions

View File

@ -1426,8 +1426,12 @@ Parser::DeclPtrTy Parser::ParseObjCPropertyDynamic(SourceLocation atLoc) {
break;
ConsumeToken(); // consume ','
}
if (Tok.isNot(tok::semi))
if (Tok.isNot(tok::semi)) {
Diag(Tok, diag::err_expected_semi_after) << "@dynamic";
SkipUntil(tok::semi);
}
else
ConsumeToken(); // consume ';'
return DeclPtrTy();
}

View File

@ -0,0 +1,16 @@
// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
// rdar: // 7860960
@interface I
{
int window;
}
@property int window, noWarningNeeded;
@end
@implementation I
@synthesize window;
@dynamic noWarningNeeded;
@end