summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-04-30 21:39:24 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-04-30 21:39:24 +0000
commit68592fc9e12bf6cf4a8469b08b478a3ca75a0452 (patch)
tree5505d3afbaaf0aefbdec7c969c3bea21d6c4b5e6
parent050631c0a6b69de52aa2e230f728cb71bc0ba876 (diff)
downloadbcm5719-llvm-68592fc9e12bf6cf4a8469b08b478a3ca75a0452.tar.gz
bcm5719-llvm-68592fc9e12bf6cf4a8469b08b478a3ca75a0452.zip
Use of super class ivar to synthesize property is back to being error.
llvm-svn: 70514
-rw-r--r--clang/include/clang/Basic/DiagnosticSemaKinds.td2
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp2
-rw-r--r--clang/test/SemaObjC/ivar-sem-check-2.m2
3 files changed, 3 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index e516be526ce..a416e52fcb0 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -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">;
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 61f62cd4bf7..0c98a5f44b4 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -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)
diff --git a/clang/test/SemaObjC/ivar-sem-check-2.m b/clang/test/SemaObjC/ivar-sem-check-2.m
index e14a80ffa44..ba6b38934bd 100644
--- a/clang/test/SemaObjC/ivar-sem-check-2.m
+++ b/clang/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
OpenPOWER on IntegriCloud