[cfe-commits] r68631 - in /cfe/trunk: lib/Parse/ParseObjc.cpp test/SemaObjC/super-property-message-expr.m
Fariborz Jahanian
fjahanian at apple.com
Wed Apr 8 12:50:10 PDT 2009
Author: fjahanian
Date: Wed Apr 8 14:50:10 2009
New Revision: 68631
URL: http://llvm.org/viewvc/llvm-project?rev=68631&view=rev
Log:
Fixed a problem using property syntax on a 'super'
used as receiver.
Added:
cfe/trunk/test/SemaObjC/super-property-message-expr.m
Modified:
cfe/trunk/lib/Parse/ParseObjc.cpp
Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=68631&r1=68630&r2=68631&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Wed Apr 8 14:50:10 2009
@@ -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());
Added: cfe/trunk/test/SemaObjC/super-property-message-expr.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/super-property-message-expr.m?rev=68631&view=auto
==============================================================================
--- cfe/trunk/test/SemaObjC/super-property-message-expr.m (added)
+++ cfe/trunk/test/SemaObjC/super-property-message-expr.m Wed Apr 8 14:50:10 2009
@@ -0,0 +1,21 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+ at interface SStoreNodeInfo
+
+ at property(nonatomic,readonly,retain) id descriptionShort;
+
+- (id)stringByAppendingFormat:(int)format, ... ;
+
+ at end
+
+ at interface SStoreNodeInfo_iDisk : SStoreNodeInfo
+{
+ at private
+ id _etag;
+}
+ at end
+
+ at implementation SStoreNodeInfo_iDisk
+- (id) X { return [super.descriptionShort stringByAppendingFormat:1, _etag]; }
+
+ at end
More information about the cfe-commits
mailing list