summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit24c2ccc254c15211e070584dc7efccd321a07408 (patch)
treebf96565eea6525071a941116b58d0afe25143e95 /clang/lib
parentac8a57787f7d49bd24180a217091f93083207623 (diff)
downloadbcm5719-llvm-24c2ccc254c15211e070584dc7efccd321a07408.tar.gz
bcm5719-llvm-24c2ccc254c15211e070584dc7efccd321a07408.zip
objc: comment the code which allows narroing of property object
type in continuation class. llvm-svn: 149625
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index 7f6d8c34f4c..42a5c9d0e87 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/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(),
OpenPOWER on IntegriCloud