forked from OSchip/llvm-project
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:
parent
c9747dd60f
commit
c03f6b91b1
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
Loading…
Reference in New Issue