[cfe-commits] r157697 - in /cfe/trunk: lib/Sema/SemaExprObjC.cpp test/SemaObjC/property-user-setter.m

Fariborz Jahanian fjahanian at apple.com
Wed May 30 10:33:54 PDT 2012


Author: fjahanian
Date: Wed May 30 12:33:54 2012
New Revision: 157697

URL: http://llvm.org/viewvc/llvm-project?rev=157697&view=rev
Log:
objective-c: revert r157407. It broke a project
and reported as PR12959. // rdar://11499742

Modified:
    cfe/trunk/lib/Sema/SemaExprObjC.cpp
    cfe/trunk/test/SemaObjC/property-user-setter.m

Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=157697&r1=157696&r2=157697&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Wed May 30 12:33:54 2012
@@ -1483,10 +1483,6 @@
     SelectorTable::constructSetterName(PP.getIdentifierTable(),
                                        PP.getSelectorTable(), Member);
   ObjCMethodDecl *Setter = IFace->lookupInstanceMethod(SetterSel);
-  if (Setter && Setter->isSynthesized())
-    // Check for corner case of: @property int p; ... self.P = 0;
-    // setter name is synthesized "setP" but there is no property name 'P'.
-    Setter = 0;
       
   // May be founf in property's qualified list.
   if (!Setter)

Modified: cfe/trunk/test/SemaObjC/property-user-setter.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-user-setter.m?rev=157697&r1=157696&r2=157697&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/property-user-setter.m (original)
+++ cfe/trunk/test/SemaObjC/property-user-setter.m Wed May 30 12:33:54 2012
@@ -124,15 +124,33 @@
 @synthesize t, T;
 @synthesize Pxyz, pxyz;
 - (id) Meth {
-  self.P = 0; // expected-error {{property 'P' not found on object of type 'rdar11363363 *'}}
-  self.q = 0; // expected-error {{property 'q' not found on object of type 'rdar11363363 *'}}
+  self.P = 0;
+  self.q = 0;
 // rdar://11528439
   self.t = 0; // expected-error {{synthesized properties 't' and 'T' both claim setter 'setT:'}}
   self.T = 0; // expected-error {{synthesized properties 'T' and 't' both claim setter 'setT:'}}
   self.Pxyz = 0; // expected-error {{synthesized properties 'Pxyz' and 'pxyz' both claim setter 'setPxyz:'}}
   self.pxyz = 0; // expected-error {{synthesized properties 'pxyz' and 'Pxyz' both claim setter 'setPxyz:'}}
-  self.R = 0; // expected-error {{property 'R' not found on object of type 'rdar11363363 *'; did you mean to access ivar 'R'?}}
-  return self.R; // expected-error {{property 'R' not found on object of type 'rdar11363363 *'; did you mean to access ivar 'R'?}}
+  self.R = 0;
+  return self.R; // expected-error {{expected getter method not found on object of type 'rdar11363363 *'}}
+}
+ at end
+
+// rdar://11499742
+ at class BridgeFormatter;
+
+ at interface FMXBridgeFormatter 
+
+ at property(assign, readwrite, getter=formatter, setter=setFormatter:) BridgeFormatter* cppFormatter;
+
+ at end
+
+ at implementation FMXBridgeFormatter
+ at synthesize cppFormatter;
+
+- (void) dealloc
+{
+ self.formatter = 0;
 }
 @end
 





More information about the cfe-commits mailing list