]> granicus.if.org Git - clang/commitdiff
Fix <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized proper...
authorSteve Naroff <snaroff@apple.com>
Tue, 3 Mar 2009 22:09:41 +0000 (22:09 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 3 Mar 2009 22:09:41 +0000 (22:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65973 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclObjC.cpp
test/SemaObjC/property-nonfragile-abi.m [new file with mode: 0644]

index 1ca9d8da9acb1bd08da83b9400f36900efab4d36..59278267cd00d077cf2d60a9e587bfa95ab5ed84 100644 (file)
@@ -1734,7 +1734,8 @@ Sema::DeclTy *Sema::ActOnPropertyImplDecl(SourceLocation AtLoc,
     // Check that this is a previously declared 'ivar' in 'IDecl' interface
     Ivar = IDecl->lookupInstanceVariable(PropertyIvar);
     if (!Ivar) {
-      Diag(PropertyLoc, diag::error_missing_property_ivar_decl) << PropertyId;
+      if (!getLangOptions().ObjCNonFragileABI)
+        Diag(PropertyLoc, diag::error_missing_property_ivar_decl) << PropertyId;
       return 0;
     }
     QualType PropType = Context.getCanonicalType(property->getType());
diff --git a/test/SemaObjC/property-nonfragile-abi.m b/test/SemaObjC/property-nonfragile-abi.m
new file mode 100644 (file)
index 0000000..3dec8a8
--- /dev/null
@@ -0,0 +1,22 @@
+// RUN: clang -fsyntax-only -arch x86_64 -verify %s 
+
+typedef signed char BOOL;
+
+@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
+
+@protocol NSObject
+- (BOOL)isEqual:(id)object;
+@end
+
+@interface NSObject <NSObject> {}
+@end
+
+@interface XCDeviceWillExecuteInfoBaton : NSObject {}
+  @property (retain) __attribute__((objc_gc(strong))) NSString *sdkPath;
+@end
+
+@implementation XCDeviceWillExecuteInfoBaton
+  // No error is produced with compiling for -arch x86_64 (or "non-fragile" ABI)
+  @synthesize sdkPath;
+@end
+