aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-12 09:02:39 +0000
committerChris Lattner <sabre@nondot.org>2009-04-12 09:02:39 +0000
commit2c4463f744487e242f7c88b6daa0abf5cb24219e (patch)
tree74f37b0a6a7a5edeef26b68bce203c1c54b45f3a /lib/Sema/SemaExprObjC.cpp
parent34f24353b8746948f0d4794460f246570daed9af (diff)
Fix rdar://6770142 - Class and qualified id's are compatible, just like
Class and unqualified id's are. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index 8d8fae035a..0c1f144802 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -681,11 +681,15 @@ bool Sema::ObjCQualifiedIdTypesAreCompatible(QualType lhs, QualType rhs,
// Allow id<P..> and an 'id' or void* type in all cases.
if (const PointerType *PT = lhs->getAsPointerType()) {
QualType PointeeTy = PT->getPointeeType();
- if (Context.isObjCIdStructType(PointeeTy) || PointeeTy->isVoidType())
+ if (PointeeTy->isVoidType() ||
+ Context.isObjCIdStructType(PointeeTy) ||
+ Context.isObjCClassStructType(PointeeTy))
return true;
} else if (const PointerType *PT = rhs->getAsPointerType()) {
QualType PointeeTy = PT->getPointeeType();
- if (Context.isObjCIdStructType(PointeeTy) || PointeeTy->isVoidType())
+ if (PointeeTy->isVoidType() ||
+ Context.isObjCIdStructType(PointeeTy) ||
+ Context.isObjCClassStructType(PointeeTy))
return true;
}