diff options
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 32c769b64d..e2986a87a5 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -26,27 +26,6 @@ bool Sema::isBuiltinObjCType(TypedefDecl *TD) { strcmp(typeName, "SEL") == 0 || strcmp(typeName, "Protocol") == 0; } -/// isObjCObjectPointerType - Returns true if type is an Objective-C pointer -/// to an object type. This includes "id" and "Class" (two 'special' pointers -/// to struct), Interface* (pointer to ObjCInterfaceType) and id<P> (qualified -/// ID type). -bool Sema::isObjCObjectPointerType(QualType Ty) const { - if (Ty->isObjCQualifiedIdType()) - return true; - - if (!Ty->isPointerType()) - return false; - - // Check to see if this is 'id' or 'Class', both of which are typedefs for - // pointer types. This looks for the typedef specifically, not for the - // underlying type. - if (Ty == Context.getObjCIdType() || Ty == Context.getObjCClassType()) - return true; - - // If this a pointer to an interface (e.g. NSString*), it is ok. - return Ty->getAsPointerType()->getPointeeType()->isObjCInterfaceType(); -} - void Sema::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) { TUScope = S; CurContext = Context.getTranslationUnitDecl(); |