forked from OSchip/llvm-project
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:
parent
1f3a063f00
commit
b607393ac8
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue