]> granicus.if.org Git - clang/commitdiff
Use of super class ivar to synthesize property is back to being error.
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 30 Apr 2009 21:39:24 +0000 (21:39 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 30 Apr 2009 21:39:24 +0000 (21:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70514 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclObjC.cpp
test/SemaObjC/ivar-sem-check-2.m

index e516be526ced08085adab5217188c6b126ebe261..a416e52fcb034ad9d0ee92cf6829830d6a3a0fd8 100644 (file)
@@ -220,7 +220,7 @@ def error_synthesized_ivar_yet_not_supported : Error<
 
 def error_property_ivar_type : Error<
   "type of property %0 does not match type of ivar %1">;
-def warn_ivar_in_superclass_use : Warning<
+def error_ivar_in_superclass_use : Error<
   "property %0 attempting to use ivar %1 declared in super class %2">;
 def error_weak_property : Error<
   "existing ivar %1 for __weak property %0 must be __weak">;
index 61f62cd4bf772d2f7862e598665b50920f7d3e41..0c98a5f44b453e275eda79191313aab2bbc82c7f 100644 (file)
@@ -1918,7 +1918,7 @@ Sema::DeclPtrTy Sema::ActOnPropertyImplDecl(SourceLocation AtLoc,
     }
     else if (getLangOptions().ObjCNonFragileABI &&
              ClassDeclared != IDecl) {
-      Diag(PropertyLoc, diag::warn_ivar_in_superclass_use)
+      Diag(PropertyLoc, diag::error_ivar_in_superclass_use)
         << property->getDeclName() << Ivar->getDeclName() 
         << ClassDeclared->getDeclName();
       Diag(Ivar->getLocation(), diag::note_previous_access_declaration)
index e14a80ffa44a34ee7617ce40b67cc5419d9669ce..ba6b38934bd197338387b82112e1420889de39b3 100644 (file)
@@ -17,7 +17,7 @@
 @implementation Sub
 @synthesize value; // expected-note {{previous use is here}}
 @synthesize value1=value; // expected-error {{synthesized properties 'value1' and 'value' both claim ivar 'value'}} 
-@synthesize prop=value2;  // expected-warning {{property 'prop' attempting to use ivar 'value2' declared in super class 'Super'}}
+@synthesize prop=value2;  // expected-error {{property 'prop' attempting to use ivar 'value2' declared in super class 'Super'}}
 @end