Tweak diag for <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: 66162
This commit is contained in:
Steve Naroff 2009-03-05 15:45:01 +00:00
parent 41d09add4f
commit 8f4528bc7c
3 changed files with 9 additions and 3 deletions

View File

@ -213,6 +213,9 @@ DIAG(error_bad_property_context, ERROR,
DIAG(error_missing_property_ivar_decl, ERROR,
"synthesized property %0 must either be named the same as a compatible"
" ivar or must explicitly name an ivar")
DIAG(error_synthesized_ivar_yet_not_supported, ERROR,
"instance variable synthesis not yet supported"
" (need to declare %0 explicitly)")
DIAG(error_property_ivar_type, ERROR,
"type of property %0 does not match type of ivar %1")
DIAG(error_weak_property, ERROR,

View File

@ -1757,7 +1757,10 @@ Sema::DeclTy *Sema::ActOnPropertyImplDecl(SourceLocation AtLoc,
// Check that this is a previously declared 'ivar' in 'IDecl' interface
Ivar = IDecl->lookupInstanceVariable(PropertyIvar);
if (!Ivar) {
if (!getLangOptions().ObjCNonFragileABI)
if (getLangOptions().ObjCNonFragileABI)
Diag(PropertyLoc, diag::error_synthesized_ivar_yet_not_supported)
<< PropertyId;
else
Diag(PropertyLoc, diag::error_missing_property_ivar_decl) << PropertyId;
return 0;
}

View File

@ -16,7 +16,7 @@ typedef signed char BOOL;
@end
@implementation XCDeviceWillExecuteInfoBaton
// No error is produced with compiling for -arch x86_64 (or "non-fragile" ABI)
@synthesize sdkPath;
// Produce an error when compiling for -arch x86_64 (or "non-fragile" ABI)
@synthesize sdkPath; // expected-error{{instance variable synthesis not yet supported (need to declare 'sdkPath' explicitly)}}
@end