[cfe-commits] r100212 - in /cfe/trunk: lib/Sema/SemaExpr.cpp test/SemaObjC/default-synthesize.m

Fariborz Jahanian fjahanian at apple.com
Fri Apr 2 13:09:24 PDT 2010


Author: fjahanian
Date: Fri Apr  2 15:09:24 2010
New Revision: 100212

URL: http://llvm.org/viewvc/llvm-project?rev=100212&view=rev
Log:
Diagnose invalid code with -fobjc-nonfragile-abi2 when
property is being accessed without the dot-syntax notation.
(radar 7822344).

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp
    cfe/trunk/test/SemaObjC/default-synthesize.m

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=100212&r1=100211&r2=100212&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Fri Apr  2 15:09:24 2010
@@ -1345,11 +1345,6 @@
       }
     }
   }
-  if (LangOpts.ObjCNonFragileABI2 && LookForIvars && Lookup.empty()) {
-    ObjCIvarDecl *Ivar = SynthesizeNewPropertyIvar(IFace, II);
-    if (Ivar)
-      return LookupInObjCMethod(Lookup, S, II, AllowBuiltinCreation);
-  }
   // Sentinel value saying that we didn't do anything special.
   return Owned((Expr*) 0);
 }

Modified: cfe/trunk/test/SemaObjC/default-synthesize.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/default-synthesize.m?rev=100212&r1=100211&r2=100212&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/default-synthesize.m (original)
+++ cfe/trunk/test/SemaObjC/default-synthesize.m Fri Apr  2 15:09:24 2010
@@ -23,12 +23,12 @@
 //@synthesize howMany, what;
 
 - (int) howMany {
-    return howMany;
+    return self.howMany;
 }
 // - (void) setHowMany: (int) value
 
 - (NSString*) what {
-    return what;
+    return self.what;
 }
 // - (void) setWhat: (NSString*) value    
 @end
@@ -44,12 +44,12 @@
 
 // - (int) howMany
 - (void) setHowMany: (int) value {
-    howMany = value;
+    self.howMany = value;
 }
 
 // - (NSString*) what
 - (void) setWhat: (NSString*) value {
-    if (what != value) {
+    if (self.what != value) {
     }
 }
 @end
@@ -64,17 +64,17 @@
 //@synthesize howMany, what;  // REM: Redundant anyway
 
 - (int) howMany {
-    return howMany;
+    return self.howMany;
 }
 - (void) setHowMany: (int) value {
-    howMany = value;
+    self.howMany = value;
 }
 
 - (NSString*) what {
-    return what;
+    return self.what;
 }
 - (void) setWhat: (NSString*) value {
-    if (what != value) {
+    if (self.what != value) {
     }
 }
 @end





More information about the cfe-commits mailing list