Fix <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar.

llvm-svn: 65973
This commit is contained in:
Steve Naroff 2009-03-03 22:09:41 +00:00
parent c9747dd60f
commit c03f6b91b1
2 changed files with 24 additions and 1 deletions

View 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());

View File

@ -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