Fixed a problem using property syntax on a 'super'

used as receiver.

llvm-svn: 68631
This commit is contained in:
Fariborz Jahanian 2009-04-08 19:50:10 +00:00
parent 2ac33a08d5
commit fc58ca4af6
2 changed files with 26 additions and 3 deletions

View File

@ -1449,10 +1449,12 @@ Parser::OwningExprResult Parser::ParseObjCMessageExpression() {
// Parse receiver
if (isTokObjCMessageIdentifierReceiver()) {
IdentifierInfo *ReceiverName = Tok.getIdentifierInfo();
if (ReceiverName != Ident_super || GetLookAheadToken(1).isNot(tok::period)) {
SourceLocation NameLoc = ConsumeToken();
return ParseObjCMessageExpressionBody(LBracLoc, NameLoc, ReceiverName,
ExprArg(Actions));
}
}
OwningExprResult Res(ParseExpression());
if (Res.isInvalid()) {

View File

@ -0,0 +1,21 @@
// RUN: clang-cc -fsyntax-only -verify %s
@interface SStoreNodeInfo
@property(nonatomic,readonly,retain) id descriptionShort;
- (id)stringByAppendingFormat:(int)format, ... ;
@end
@interface SStoreNodeInfo_iDisk : SStoreNodeInfo
{
@private
id _etag;
}
@end
@implementation SStoreNodeInfo_iDisk
- (id) X { return [super.descriptionShort stringByAppendingFormat:1, _etag]; }
@end