aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-11-16 02:32:08 +0000
committerJohn McCall <rjmccall@apple.com>2010-11-16 02:32:08 +0000
commit1c23e91ef66688d20868b6bab3b5589a119eb603 (patch)
tree79ee479cc88f3c6a1947845f0442b688593683fd /lib/Sema/SemaObjCProperty.cpp
parentea834df7cd07d67a77e7dd6e48e8db27464be2fd (diff)
Kill off the remaining places which generate CK_Unknown casts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119326 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 4c439f90e8..fe2de27c6c 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -424,11 +424,9 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S,
Context.canAssignObjCInterfaces(
PropType->getAs<ObjCObjectPointerType>(),
IvarType->getAs<ObjCObjectPointerType>());
- else {
- CastKind K = CK_Invalid;
- compat = (CheckAssignmentConstraints(PropType, IvarType, K)
+ else
+ compat = (CheckAssignmentConstraints(PropType, IvarType)
== Compatible);
- }
if (!compat) {
Diag(PropertyLoc, diag::error_property_ivar_type)
<< property->getDeclName() << PropType
@@ -647,11 +645,9 @@ bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property,
if (GetterMethod &&
GetterMethod->getResultType() != property->getType()) {
AssignConvertType result = Incompatible;
- if (property->getType()->isObjCObjectPointerType()) {
- CastKind Kind = CK_Invalid;
+ if (property->getType()->isObjCObjectPointerType())
result = CheckAssignmentConstraints(GetterMethod->getResultType(),
- property->getType(), Kind);
- }
+ property->getType());
if (result != Compatible) {
Diag(Loc, diag::warn_accessor_property_type_mismatch)
<< property->getDeclName()