aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-02-02 19:34:05 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-02-02 19:34:05 +0000
commitff2a0ecae1d7692dbb63aa540dba41a8c21d7ee4 (patch)
treea548790b0d6ac27101ea41d6574f8710d609a82d /lib/Sema/SemaObjCProperty.cpp
parent0d3b87cd3a644a71e2e7bb28f32bfc6d5cdb9747 (diff)
objc: comment the code which allows narroing of property object
type in continuation class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 7f6d8c34f4..42a5c9d0e8 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -279,6 +279,9 @@ Sema::HandlePropertyInClassExtension(Scope *S,
if (!Context.hasSameType(PIDecl->getType(), PDecl->getType())) {
bool IncompatibleObjC = false;
QualType ConvertedType;
+ // Relax the strict type matching for property type in continuation class.
+ // Allow property object type of continuation class to be different as long
+ // as it narrows the object type in its primary class property.
if (!isa<ObjCObjectPointerType>(PIDecl->getType()) ||
!isa<ObjCObjectPointerType>(PDecl->getType()) ||
(!isObjCPointerConversion(PDecl->getType(), PIDecl->getType(),