[cfe-commits] r109808 - /cfe/trunk/lib/AST/Type.cpp

Douglas Gregor dgregor at apple.com
Thu Jul 29 15:17:04 PDT 2010


Author: dgregor
Date: Thu Jul 29 17:17:04 2010
New Revision: 109808

URL: http://llvm.org/viewvc/llvm-project?rev=109808&view=rev
Log:
Teach isIncompleteType() to look through sugar when it is dealing with
Objective-C object and interface types. This is part of PR7741.

Modified:
    cfe/trunk/lib/AST/Type.cpp

Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=109808&r1=109807&r2=109808&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Thu Jul 29 17:17:04 2010
@@ -643,10 +643,11 @@
     // 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();
   }
 }
 





More information about the cfe-commits mailing list