Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/AST/ODRHash.cpp
Show First 20 Lines • Show All 331 Lines • ▼ Show 20 Lines | void VisitFieldDecl(const FieldDecl *D) { | ||||
} | } | ||||
Hash.AddBoolean(D->isMutable()); | Hash.AddBoolean(D->isMutable()); | ||||
AddStmt(D->getInClassInitializer()); | AddStmt(D->getInClassInitializer()); | ||||
Inherited::VisitFieldDecl(D); | Inherited::VisitFieldDecl(D); | ||||
} | } | ||||
void VisitObjCPropertyDecl(const ObjCPropertyDecl *D) { | |||||
ID.AddInteger(D->getPropertyAttributes()); | |||||
ID.AddInteger(D->getPropertyImplementation()); | |||||
AddQualType(D->getType()); | |||||
AddDecl(D); | |||||
Inherited::VisitObjCPropertyDecl(D); | |||||
} | |||||
void VisitFunctionDecl(const FunctionDecl *D) { | void VisitFunctionDecl(const FunctionDecl *D) { | ||||
// Handled by the ODRHash for FunctionDecl | // Handled by the ODRHash for FunctionDecl | ||||
ID.AddInteger(D->getODRHash()); | ID.AddInteger(D->getODRHash()); | ||||
Inherited::VisitFunctionDecl(D); | Inherited::VisitFunctionDecl(D); | ||||
} | } | ||||
void VisitCXXMethodDecl(const CXXMethodDecl *D) { | void VisitCXXMethodDecl(const CXXMethodDecl *D) { | ||||
▲ Show 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | switch (D->getKind()) { | ||||
case Decl::Field: | case Decl::Field: | ||||
case Decl::Friend: | case Decl::Friend: | ||||
case Decl::FunctionTemplate: | case Decl::FunctionTemplate: | ||||
case Decl::StaticAssert: | case Decl::StaticAssert: | ||||
case Decl::TypeAlias: | case Decl::TypeAlias: | ||||
case Decl::Typedef: | case Decl::Typedef: | ||||
case Decl::Var: | case Decl::Var: | ||||
case Decl::ObjCMethod: | case Decl::ObjCMethod: | ||||
case Decl::ObjCProperty: | |||||
return true; | return true; | ||||
} | } | ||||
} | } | ||||
void ODRHash::AddSubDecl(const Decl *D) { | void ODRHash::AddSubDecl(const Decl *D) { | ||||
assert(D && "Expecting non-null pointer."); | assert(D && "Expecting non-null pointer."); | ||||
ODRDeclVisitor(ID, *this).Visit(D); | ODRDeclVisitor(ID, *this).Visit(D); | ||||
▲ Show 20 Lines • Show All 691 Lines • Show Last 20 Lines |