diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 8a942c7702..bac3f91d0a 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -1449,9 +1449,11 @@ Parser::OwningExprResult Parser::ParseObjCMessageExpression() { // Parse receiver if (isTokObjCMessageIdentifierReceiver()) { IdentifierInfo *ReceiverName = Tok.getIdentifierInfo(); - SourceLocation NameLoc = ConsumeToken(); - return ParseObjCMessageExpressionBody(LBracLoc, NameLoc, ReceiverName, - ExprArg(Actions)); + if (ReceiverName != Ident_super || GetLookAheadToken(1).isNot(tok::period)) { + SourceLocation NameLoc = ConsumeToken(); + return ParseObjCMessageExpressionBody(LBracLoc, NameLoc, ReceiverName, + ExprArg(Actions)); + } } OwningExprResult Res(ParseExpression()); diff --git a/test/SemaObjC/super-property-message-expr.m b/test/SemaObjC/super-property-message-expr.m new file mode 100644 index 0000000000..082d8bd5b4 --- /dev/null +++ b/test/SemaObjC/super-property-message-expr.m @@ -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