clang 20.0.0git
|
#include "clang/AST/ODRHash.h"
Public Member Functions | |
ODRHash () | |
void | AddCXXRecordDecl (const CXXRecordDecl *Record) |
void | AddRecordDecl (const RecordDecl *Record) |
void | AddObjCInterfaceDecl (const ObjCInterfaceDecl *Record) |
void | AddFunctionDecl (const FunctionDecl *Function, bool SkipBody=false) |
void | AddEnumDecl (const EnumDecl *Enum) |
void | AddObjCProtocolDecl (const ObjCProtocolDecl *P) |
void | AddSubDecl (const Decl *D) |
void | clear () |
unsigned | CalculateHash () |
void | AddDecl (const Decl *D) |
void | AddType (const Type *T) |
void | AddQualType (QualType T) |
void | AddStmt (const Stmt *S) |
void | AddIdentifierInfo (const IdentifierInfo *II) |
void | AddNestedNameSpecifier (const NestedNameSpecifier *NNS) |
void | AddTemplateName (TemplateName Name) |
void | AddDeclarationName (DeclarationName Name, bool TreatAsDecl=false) |
void | AddTemplateArgument (TemplateArgument TA) |
void | AddTemplateParameterList (const TemplateParameterList *TPL) |
void | AddBoolean (bool value) |
void | AddStructuralValue (const APValue &) |
Static Public Member Functions | |
static bool | isSubDeclToBeProcessed (const Decl *D, const DeclContext *Parent) |
void ODRHash::AddBoolean | ( | bool | value | ) |
Definition at line 1271 of file ODRHash.cpp.
Referenced by AddCXXRecordDecl(), AddDecl(), AddDeclarationName(), AddEnumDecl(), AddFunctionDecl(), AddNestedNameSpecifier(), AddObjCInterfaceDecl(), AddQualType(), and AddTemplateName().
void ODRHash::AddCXXRecordDecl | ( | const CXXRecordDecl * | Record | ) |
Definition at line 569 of file ODRHash.cpp.
References AddBoolean(), AddDecl(), AddQualType(), AddSubDecl(), AddTemplateParameterList(), clang::Function, clang::DeclContext::getParent(), clang::TemplateDecl::getTemplateParameters(), and isSubDeclToBeProcessed().
Referenced by clang::CXXRecordDecl::getODRHash().
void ODRHash::AddDecl | ( | const Decl * | D | ) |
Definition at line 807 of file ODRHash.cpp.
References AddBoolean(), AddDeclarationName(), AddTemplateArgument(), D, clang::Decl::getCanonicalDecl(), clang::NamedDecl::getDeclName(), clang::Decl::getKind(), and clang::Specialization.
Referenced by AddCXXRecordDecl(), AddFunctionDecl(), AddNestedNameSpecifier(), AddObjCInterfaceDecl(), AddObjCProtocolDecl(), AddRecordDecl(), AddStructuralValue(), AddTemplateArgument(), and AddTemplateName().
void ODRHash::AddDeclarationName | ( | DeclarationName | Name, |
bool | TreatAsDecl = false |
||
) |
Definition at line 34 of file ODRHash.cpp.
References AddBoolean().
Referenced by AddDecl(), AddEnumDecl(), AddObjCInterfaceDecl(), and AddObjCProtocolDecl().
void ODRHash::AddEnumDecl | ( | const EnumDecl * | Enum | ) |
Definition at line 754 of file ODRHash.cpp.
References AddBoolean(), AddDeclarationName(), AddQualType(), AddSubDecl(), clang::Enum, and isSubDeclToBeProcessed().
Referenced by clang::EnumDecl::getODRHash().
void ODRHash::AddFunctionDecl | ( | const FunctionDecl * | Function, |
bool | SkipBody = false |
||
) |
Definition at line 661 of file ODRHash.cpp.
References AddBoolean(), AddDecl(), AddQualType(), AddStmt(), AddSubDecl(), AddTemplateArgument(), clang::Function, clang::StringLiteral::getBytes(), clang::DeclContext::getLexicalParent(), clang::DeclContext::getParent(), clang::DeclContext::isFileContext(), and isSubDeclToBeProcessed().
Referenced by clang::ODRDiagsEmitter::diagnoseMismatch(), and clang::FunctionDecl::getODRHash().
void ODRHash::AddIdentifierInfo | ( | const IdentifierInfo * | II | ) |
Definition at line 29 of file ODRHash.cpp.
References clang::IdentifierInfo::getName().
Referenced by AddNestedNameSpecifier().
void ODRHash::AddNestedNameSpecifier | ( | const NestedNameSpecifier * | NNS | ) |
Definition at line 112 of file ODRHash.cpp.
References AddBoolean(), AddDecl(), AddIdentifierInfo(), AddNestedNameSpecifier(), AddType(), clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsType(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifier::getPrefix(), clang::NestedNameSpecifier::Global, clang::NestedNameSpecifier::Identifier, clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.
Referenced by AddNestedNameSpecifier(), and AddTemplateName().
void ODRHash::AddObjCInterfaceDecl | ( | const ObjCInterfaceDecl * | Record | ) |
Definition at line 634 of file ODRHash.cpp.
References AddBoolean(), AddDecl(), AddDeclarationName(), AddSubDecl(), clang::DeclContext::decls(), clang::ObjCInterfaceDecl::getReferencedProtocols(), clang::ObjCInterfaceDecl::getSuperClass(), isSubDeclToBeProcessed(), clang::ObjCInterfaceDecl::protocols(), and clang::ObjCListBase::size().
Referenced by clang::ObjCInterfaceDecl::getODRHash().
void ODRHash::AddObjCProtocolDecl | ( | const ObjCProtocolDecl * | P | ) |
Definition at line 782 of file ODRHash.cpp.
References AddDecl(), AddDeclarationName(), AddSubDecl(), isSubDeclToBeProcessed(), and P.
Referenced by clang::ObjCProtocolDecl::getODRHash().
void ODRHash::AddQualType | ( | QualType | T | ) |
Definition at line 1262 of file ODRHash.cpp.
References AddBoolean(), AddType(), clang::Qualifiers::getAsOpaqueValue(), clang::SplitQualType::Quals, clang::T, and clang::SplitQualType::Ty.
Referenced by AddCXXRecordDecl(), AddEnumDecl(), AddFunctionDecl(), AddTemplateArgument(), and computeODRHash().
void ODRHash::AddRecordDecl | ( | const RecordDecl * | Record | ) |
Definition at line 616 of file ODRHash.cpp.
References AddDecl(), AddSubDecl(), and isSubDeclToBeProcessed().
Referenced by clang::RecordDecl::getODRHash().
void ODRHash::AddStmt | ( | const Stmt * | S | ) |
Definition at line 24 of file ODRHash.cpp.
Referenced by AddFunctionDecl(), AddTemplateArgument(), computeODRHash(), and clang::ExplicitSpecifier::isEquivalent().
void ODRHash::AddStructuralValue | ( | const APValue & | Value | ) |
Definition at line 1275 of file ODRHash.cpp.
References AddDecl(), D, E, clang::Type::getAsArrayTypeUnsafe(), clang::Decl::getASTContext(), clang::Value::getKind(), clang::ASTContext::getMemberPointerPathAdjustment(), clang::CharUnits::getQuantity(), clang::ASTContext::getRecordType(), clang::APValue::LValue, and clang::APValue::MemberPointer.
Referenced by AddTemplateArgument().
void ODRHash::AddSubDecl | ( | const Decl * | D | ) |
Definition at line 563 of file ODRHash.cpp.
References D.
Referenced by AddCXXRecordDecl(), AddEnumDecl(), AddFunctionDecl(), AddObjCInterfaceDecl(), AddObjCProtocolDecl(), AddRecordDecl(), AddTemplateParameterList(), and computeODRHash().
void ODRHash::AddTemplateArgument | ( | TemplateArgument | TA | ) |
Definition at line 168 of file ODRHash.cpp.
References AddDecl(), AddQualType(), AddStmt(), AddStructuralValue(), AddTemplateArgument(), AddTemplateName(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsDecl(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsIntegral(), clang::TemplateArgument::getAsStructuralValue(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::getStructuralValueType(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::pack_elements(), clang::TemplateArgument::pack_size(), clang::TemplateArgument::StructuralValue, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.
Referenced by AddDecl(), AddFunctionDecl(), AddTemplateArgument(), and computeODRHash().
void ODRHash::AddTemplateName | ( | TemplateName | Name | ) |
Definition at line 141 of file ODRHash.cpp.
References AddBoolean(), AddDecl(), AddNestedNameSpecifier(), AddTemplateName(), clang::TemplateName::AssumedTemplate, clang::TemplateName::DependentTemplate, clang::QualifiedTemplateName::getQualifier(), clang::QualifiedTemplateName::getUnderlyingTemplate(), clang::QualifiedTemplateName::hasTemplateKeyword(), clang::TemplateName::OverloadedTemplate, clang::TemplateName::QualifiedTemplate, clang::TemplateName::SubstTemplateTemplateParm, clang::TemplateName::SubstTemplateTemplateParmPack, clang::TemplateName::Template, and clang::TemplateName::UsingTemplate.
Referenced by AddTemplateArgument(), and AddTemplateName().
void ODRHash::AddTemplateParameterList | ( | const TemplateParameterList * | TPL | ) |
Definition at line 210 of file ODRHash.cpp.
References AddSubDecl(), clang::TemplateParameterList::asArray(), and clang::TemplateParameterList::size().
Referenced by AddCXXRecordDecl(), and clang::ODRDiagsEmitter::diagnoseMismatch().
void ODRHash::AddType | ( | const Type * | T | ) |
Definition at line 1257 of file ODRHash.cpp.
References clang::T.
Referenced by AddNestedNameSpecifier(), and AddQualType().
unsigned ODRHash::CalculateHash | ( | ) |
Definition at line 225 of file ODRHash.cpp.
References CHAR_BIT, and remainder.
Referenced by computeODRHash(), clang::ODRDiagsEmitter::diagnoseMismatch(), clang::FunctionDecl::getODRHash(), clang::EnumDecl::getODRHash(), clang::RecordDecl::getODRHash(), clang::ObjCInterfaceDecl::getODRHash(), clang::ObjCProtocolDecl::getODRHash(), clang::CXXRecordDecl::getODRHash(), and clang::ExplicitSpecifier::isEquivalent().
void ODRHash::clear | ( | ) |
Definition at line 219 of file ODRHash.cpp.
|
static |
Definition at line 537 of file ODRHash.cpp.
References D, clang::Decl::getDeclContext(), clang::Decl::getKind(), clang::Decl::isImplicit(), and Parent.
Referenced by AddCXXRecordDecl(), AddEnumDecl(), AddFunctionDecl(), AddObjCInterfaceDecl(), AddObjCProtocolDecl(), AddRecordDecl(), and clang::ODRDiagsEmitter::diagnoseMismatch().