aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Type.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-29 22:17:04 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-29 22:17:04 +0000
commitd0221526bcc81f49eff5c992978176e83ada3bc7 (patch)
treecbe4139614f0c3e741c05f1d407cc2f8111ac679 /lib/AST/Type.cpp
parenteb518b4b89e4134b21975530809697142f69b779 (diff)
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
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r--lib/AST/Type.cpp5
1 files 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<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();
}
}