From d0221526bcc81f49eff5c992978176e83ada3bc7 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 29 Jul 2010 22:17:04 +0000 Subject: [PATCH] Teach isIncompleteType() to look through sugar when it is dealing with 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 67fa1e6cf9..49d579f4a0 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -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(this)->getBaseType()->isIncompleteType(); + return cast(CanonicalType)->getBaseType() + ->isIncompleteType(); case ObjCInterface: // ObjC interfaces are incomplete if they are @class, not @interface. - return cast(this)->getDecl()->isForwardDecl(); + return cast(CanonicalType)->getDecl()->isForwardDecl(); } } -- 2.50.1