Teach isIncompleteType() to look through sugar when it is dealing with

Objective-C object and interface types. This is part of PR7741.

llvm-svn: 109808
This commit is contained in:
Douglas Gregor 2010-07-29 22:17:04 +00:00
parent 1f3a063f00
commit b607393ac8
1 changed files with 3 additions and 2 deletions

View File

@ -643,10 +643,11 @@ bool Type::isIncompleteType() const {
// An array of unknown size is an incomplete type (C99 6.2.5p22).
return true;
case ObjCObject:
return cast<ObjCObjectType>(this)->getBaseType()->isIncompleteType();
return cast<ObjCObjectType>(CanonicalType)->getBaseType()
->isIncompleteType();
case ObjCInterface:
// ObjC interfaces are incomplete if they are @class, not @interface.
return cast<ObjCInterfaceType>(this)->getDecl()->isForwardDecl();
return cast<ObjCInterfaceType>(CanonicalType)->getDecl()->isForwardDecl();
}
}