From: Fariborz Jahanian Date: Tue, 30 Oct 2007 00:00:49 +0000 (+0000) Subject: Assert if isObjcIdType is called before 'id' type is built. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ed05071969757ef84d7fd43168a82cb46d610fd;p=clang Assert if isObjcIdType is called before 'id' type is built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43484 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 48e7e13c90..9adb35aca2 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -260,6 +260,7 @@ public: bool interfaceTypesAreCompatible(QualType, QualType); bool objcTypesAreCompatible(QualType, QualType); bool isObjcIdType(QualType T) const { + assert(IdStructType && "isObjcIdType used before 'id' type is built"); return T->getAsStructureType() == IdStructType; } private: