[cfe-commits] r68338 - in /cfe/trunk: lib/Parse/ParseExpr.cpp test/SemaObjC/class-property-access.m
Steve Naroff
snaroff at apple.com
Thu Apr 2 11:38:00 PDT 2009
Author: snaroff
Date: Thu Apr 2 13:37:59 2009
New Revision: 68338
URL: http://llvm.org/viewvc/llvm-project?rev=68338&view=rev
Log:
Fix http://llvm.org/bugs/show_bug.cgi?id=3907.
Added:
cfe/trunk/test/SemaObjC/class-property-access.m
Modified:
cfe/trunk/lib/Parse/ParseExpr.cpp
Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=68338&r1=68337&r2=68338&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Thu Apr 2 13:37:59 2009
@@ -589,7 +589,8 @@
Res = Actions.ActOnClassPropertyRefExpr(ReceiverName, PropertyName,
IdentLoc, PropertyLoc);
- return move(Res);
+ // These can be followed by postfix-expr pieces.
+ return ParsePostfixExpressionSuffix(move(Res));
}
// Consume the identifier so that we can see if it is followed by a '('.
// Function designators are allowed to be undeclared (C99 6.5.1p2), so we
Added: cfe/trunk/test/SemaObjC/class-property-access.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/class-property-access.m?rev=68338&view=auto
==============================================================================
--- cfe/trunk/test/SemaObjC/class-property-access.m (added)
+++ cfe/trunk/test/SemaObjC/class-property-access.m Thu Apr 2 13:37:59 2009
@@ -0,0 +1,12 @@
+// RUN: clang -fsyntax-only -verify %s
+
+ at interface Test {}
++ (Test*)one;
+- (int)two;
+ at end
+
+int main ()
+{
+ return Test.one.two;
+}
+
More information about the cfe-commits
mailing list