]> granicus.if.org Git - clang/commitdiff
objc: comment the code which allows narroing of property object
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 2 Feb 2012 19:34:05 +0000 (19:34 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 2 Feb 2012 19:34:05 +0000 (19:34 +0000)
type in continuation class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149625 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaObjCProperty.cpp

index 7f6d8c34f4ce022f87f96bdaf7409c1ca160187e..42a5c9d0e870c76137034e7c1a44b5e3d638630b 100644 (file)
@@ -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(),