diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/ASTContext.h | 16 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticKinds.def | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index dda0490f24..043ffb30c9 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -59,6 +59,10 @@ class ASTContext { /// ObjcProtoType - another psuedo built-in typedef type (set by Sema). QualType ObjcProtoType; const RecordType *ProtoStructType; + + /// ObjcClassType - another psuedo built-in typedef type (set by Sema). + QualType ObjcClassType; + const RecordType *ClassStructType; QualType ObjcConstantStringType; RecordDecl *CFConstantStringTypeDecl; @@ -196,6 +200,9 @@ public: void setObjcProtoType(TypedefDecl *Decl); QualType getObjcProtoType() const { return ObjcProtoType; } + void setObjcClassType(TypedefDecl *Decl); + QualType getObjcClassType() const { return ObjcClassType; } + void setBuiltinVaListType(QualType T); QualType getBuiltinVaListType() const { return BuiltinVaListType; } @@ -264,6 +271,15 @@ public: assert(IdStructType && "isObjcIdType used before 'id' type is built"); return T->getAsStructureType() == IdStructType; } + bool isObjcClassType(QualType T) const { + assert(ClassStructType && "isObjcClassType used before 'Class' type is built"); + return T->getAsStructureType() == ClassStructType; + } + bool isObjcSelType(QualType T) const { + assert(SelStructType && "isObjcSelType used before 'SEL' type is built"); + return T->getAsStructureType() == SelStructType; + } + private: ASTContext(const ASTContext&); // DO NOT IMPLEMENT void operator=(const ASTContext&); // DO NOT IMPLEMENT diff --git a/include/clang/Basic/DiagnosticKinds.def b/include/clang/Basic/DiagnosticKinds.def index bbdb6bc517..8a65b7310e 100644 --- a/include/clang/Basic/DiagnosticKinds.def +++ b/include/clang/Basic/DiagnosticKinds.def @@ -450,6 +450,8 @@ DIAG(err_missing_id_definition, ERROR, "cannot find definition of 'id'") DIAG(err_missing_proto_definition, ERROR, "cannot find definition of 'Protocol'") +DIAG(err_missing_class_definition, ERROR, + "cannot find definition of 'Class'") DIAG(warn_previous_alias_decl, WARNING, "previously declared alias is ignored") DIAG(warn_previous_declaration, WARNING, |