Use of super class ivar to synthesize property is back to being error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70514 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index e516be5..a416e52 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -220,7 +220,7 @@
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">;
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 61f62cd..0c98a5f 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1918,7 +1918,7 @@
}
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)
diff --git a/test/SemaObjC/ivar-sem-check-2.m b/test/SemaObjC/ivar-sem-check-2.m
index e14a80f..ba6b389 100644
--- a/test/SemaObjC/ivar-sem-check-2.m
+++ b/test/SemaObjC/ivar-sem-check-2.m
@@ -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