diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-03-24 21:00:27 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-03-24 21:00:27 +0000 |
commit | 528adb129faa6e8ca17be561539c7eede1fc024d (patch) | |
tree | c734a337fe6bbf44a625e06c62bc616822f799ec /lib | |
parent | e3e7d4e82a57b78000d5f8fcd154d90876bf0dab (diff) |
Allow conversion of qualified Class type to unqualified
Class type to match gcc's. Fixes radar 7789113.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 97f520d86f..9dddc2093a 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -4594,13 +4594,15 @@ Sema::AssignConvertType Sema::CheckObjCPointerTypesForAssignment(QualType lhsType, QualType rhsType) { if (lhsType->isObjCBuiltinType()) { // Class is not compatible with ObjC object pointers. - if (lhsType->isObjCClassType() && !rhsType->isObjCBuiltinType()) + if (lhsType->isObjCClassType() && !rhsType->isObjCBuiltinType() && + !rhsType->isObjCQualifiedClassType()) return IncompatiblePointer; return Compatible; } if (rhsType->isObjCBuiltinType()) { // Class is not compatible with ObjC object pointers. - if (rhsType->isObjCClassType() && !lhsType->isObjCBuiltinType()) + if (rhsType->isObjCClassType() && !lhsType->isObjCBuiltinType() && + !lhsType->isObjCQualifiedClassType()) return IncompatiblePointer; return Compatible; } |