diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-05-29 19:56:01 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-05-29 19:56:01 +0000 |
commit | 490a52b4947381879a47b4251db5fb81cdf5d02b (patch) | |
tree | 9e0f87deed466ae490df3bcf0c7b0016b5f87593 /lib/Sema/SemaObjCProperty.cpp | |
parent | 6ea73b243b72b2793b6304e3e4dc71619e017263 (diff) |
objective-c: fix a sema and IRGen crash when property
getter result type is safe but does not match with property
type resulting in spurious warning followed by crash in
IRGen. // rdar://11515196
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 88de7d315e..fb49e9f50c 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -1114,9 +1114,9 @@ bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, isa<ObjCObjectPointerType>(GetterType)) compat = Context.canAssignObjCInterfaces( - PropertyIvarType->getAs<ObjCObjectPointerType>(), - GetterType->getAs<ObjCObjectPointerType>()); - else if (CheckAssignmentConstraints(Loc, PropertyIvarType, GetterType) + GetterType->getAs<ObjCObjectPointerType>(), + PropertyIvarType->getAs<ObjCObjectPointerType>()); + else if (CheckAssignmentConstraints(Loc, GetterType, PropertyIvarType) != Compatible) { Diag(Loc, diag::error_property_accessor_type) << property->getDeclName() << PropertyIvarType |