Fixed a problem using property syntax on a 'super'
used as receiver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68631 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 8a942c7..bac3f91 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -1449,9 +1449,11 @@
// 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());