diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-09-24 00:56:59 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-09-24 00:56:59 +0000 |
commit | 11ee283e2a9e6af8b5b9acde742ed712d9e8c791 (patch) | |
tree | fd0c41a45169ef31297086e2121cec1e40ea68d5 /clang/lib/Sema/SemaObjCProperty.cpp | |
parent | cac9c5f971eb7fda865982dbb6180d77aa5a45bf (diff) | |
download | bcm5719-llvm-11ee283e2a9e6af8b5b9acde742ed712d9e8c791.tar.gz bcm5719-llvm-11ee283e2a9e6af8b5b9acde742ed712d9e8c791.zip |
objc - redeclaration of property in extension class
must match property type declaration in its
primary class. // rdar://10142679
llvm-svn: 140438
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index 2bb54560b76..6284f36e416 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -235,7 +235,13 @@ Sema::HandlePropertyInClassExtension(Scope *S, /* lexicalDC = */ CDecl); return PDecl; } - + if (PIDecl->getType().getCanonicalType() + != PDecl->getType().getCanonicalType()) { + Diag(AtLoc, + diag::error_type_mismatch_continuation_class) << PDecl->getType(); + Diag(PIDecl->getLocation(), diag::note_property_declare); + } + // The property 'PIDecl's readonly attribute will be over-ridden // with continuation class's readwrite property attribute! unsigned PIkind = PIDecl->getPropertyAttributesAsWritten(); |