diff options
author | John McCall <rjmccall@apple.com> | 2010-11-15 09:13:47 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-11-15 09:13:47 +0000 |
commit | daa8e4e888758d55a7a759dd4a91b83921cef222 (patch) | |
tree | da0538d1a354cd6a6fabcd34d8015c90b6b28754 /lib/Sema/SemaObjCProperty.cpp | |
parent | 5ede807c1194c3a44c0adee83eca24efd626e5bb (diff) |
Assorted work leading towards the elimination of CK_Unknown.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index e1c0f4af99..4c439f90e8 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -424,8 +424,11 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S, Context.canAssignObjCInterfaces( PropType->getAs<ObjCObjectPointerType>(), IvarType->getAs<ObjCObjectPointerType>()); - else - compat = (CheckAssignmentConstraints(PropType, IvarType) == Compatible); + else { + CastKind K = CK_Invalid; + compat = (CheckAssignmentConstraints(PropType, IvarType, K) + == Compatible); + } if (!compat) { Diag(PropertyLoc, diag::error_property_ivar_type) << property->getDeclName() << PropType @@ -644,9 +647,11 @@ bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, if (GetterMethod && GetterMethod->getResultType() != property->getType()) { AssignConvertType result = Incompatible; - if (property->getType()->isObjCObjectPointerType()) + if (property->getType()->isObjCObjectPointerType()) { + CastKind Kind = CK_Invalid; result = CheckAssignmentConstraints(GetterMethod->getResultType(), - property->getType()); + property->getType(), Kind); + } if (result != Compatible) { Diag(Loc, diag::warn_accessor_property_type_mismatch) << property->getDeclName() |