diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-02-02 22:37:48 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-02-02 22:37:48 +0000 |
commit | ad7eff2faf517779689327dc268817c2c2c8ebc4 (patch) | |
tree | e25bed56ff433a4b5a4673e35384ecb946fb8bc6 /lib/Sema/SemaObjCProperty.cpp | |
parent | 245da28bd2629c7bcd0d30f389ac6b1fb7e33fd7 (diff) |
Further enhance comment for property in continuation class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 42a5c9d0e8..9d849ff74f 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -281,7 +281,10 @@ Sema::HandlePropertyInClassExtension(Scope *S, 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. + // as it narrows the object type in its primary class property. Note that + // this conversion is safe only because the wider type is for a 'readonly' + // property in primary class and 'narrowed' type for a 'readwrite' property + // in continuation class. if (!isa<ObjCObjectPointerType>(PIDecl->getType()) || !isa<ObjCObjectPointerType>(PDecl->getType()) || (!isObjCPointerConversion(PDecl->getType(), PIDecl->getType(), |