[cfe-commits] r65973 - in /cfe/trunk: lib/Sema/SemaDeclObjC.cpp test/SemaObjC/property-nonfragile-abi.m

Fariborz Jahanian fjahanian at apple.com
Tue Mar 3 14:17:33 PST 2009


We can't really turn off this error message for non-fragile abi until  
we implement synthesizing the ivar in non-fragile abi.
Test case probably blows up with -S

- Fariborz

On Mar 3, 2009, at 2:09 PM, Steve Naroff wrote:

> Author: snaroff
> Date: Tue Mar  3 16:09:41 2009
> New Revision: 65973
>
> URL: http://llvm.org/viewvc/llvm-project?rev=65973&view=rev
> Log:
> 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.
>
> Added:
>    cfe/trunk/test/SemaObjC/property-nonfragile-abi.m
> Modified:
>    cfe/trunk/lib/Sema/SemaDeclObjC.cpp
>
> Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=65973&r1=65972&r2=65973&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Tue Mar  3 16:09:41 2009
> @@ -1734,7 +1734,8 @@
>     // 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());
>
> Added: cfe/trunk/test/SemaObjC/property-nonfragile-abi.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-nonfragile-abi.m?rev=65973&view=auto
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/test/SemaObjC/property-nonfragile-abi.m (added)
> +++ cfe/trunk/test/SemaObjC/property-nonfragile-abi.m Tue Mar  3  
> 16:09:41 2009
> @@ -0,0 +1,22 @@
> +// RUN: clang -fsyntax-only -arch x86_64 -verify %s
> +
> +typedef signed char BOOL;
> +
> + at class NSInvocation, NSMethodSignature, NSCoder, NSString,  
> NSEnumerator;
> +
> + at protocol NSObject
> +- (BOOL)isEqual:(id)object;
> + at end
> +
> + at interface NSObject <NSObject> {}
> + at end
> +
> + at interface XCDeviceWillExecuteInfoBaton : NSObject {}
> +  @property (retain) __attribute__((objc_gc(strong))) NSString  
> *sdkPath;
> + at end
> +
> + at implementation XCDeviceWillExecuteInfoBaton
> +  // No error is produced with compiling for -arch x86_64 (or "non- 
> fragile" ABI)
> +  @synthesize sdkPath;
> + at end
> +
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list