]> granicus.if.org Git - clang/commitdiff
Teach isIncompleteType() to look through sugar when it is dealing with
authorDouglas Gregor <dgregor@apple.com>
Thu, 29 Jul 2010 22:17:04 +0000 (22:17 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 29 Jul 2010 22:17:04 +0000 (22:17 +0000)
Objective-C object and interface types. This is part of PR7741.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109808 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Type.cpp

index 67fa1e6cf920bc6e3893aa27e21ffe37f6690c09..49d579f4a0b8bdd52b649172dbd6829e548b0037 100644 (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();
   }
 }