]> granicus.if.org Git - clang/commitdiff
Tweak diag for <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthes...
authorSteve Naroff <snaroff@apple.com>
Thu, 5 Mar 2009 15:45:01 +0000 (15:45 +0000)
committerSteve Naroff <snaroff@apple.com>
Thu, 5 Mar 2009 15:45:01 +0000 (15:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66162 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.def
lib/Sema/SemaDeclObjC.cpp
test/SemaObjC/property-nonfragile-abi.m

index 2d751ad8afbe3c62268957f0124622ace37e2ce4..4d711f72133c9a3fc8616fef28d580b4c7824bd7 100644 (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,
index d90f2adc77abf8c7b3afdb7ef9eee3f150e2a9b6..476b6afea57151c62ae54f1f6f82f7f1193564ed 100644 (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;
     }
index 4a211bd240177ad4ee65e2e1680c65a30e4b2a12..28ad942b59c91215be5487a41cf8c40ab68d7a03 100644 (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