Lines Matching defs:T

283   void AddQualType(QualType T) {
284 Hash.AddQualType(T);
856 void AddQualType(QualType T) {
857 Hash.AddQualType(T);
860 void AddType(const Type *T) {
861 Hash.AddBoolean(T);
862 if (T) {
863 Hash.AddType(T);
887 static const Type *RemoveTypedef(const Type *T) {
888 const auto *TypedefT = dyn_cast<TypedefType>(T);
890 return T;
897 return T;
902 return T;
906 return T;
911 return T;
916 return T;
923 return T;
929 void Visit(const Type *T) {
930 T = RemoveTypedef(T);
931 ID.AddInteger(T->getTypeClass());
932 Inherited::Visit(T);
935 void VisitType(const Type *T) {}
937 void VisitAdjustedType(const AdjustedType *T) {
938 AddQualType(T->getOriginalType());
940 VisitType(T);
943 void VisitDecayedType(const DecayedType *T) {
946 VisitAdjustedType(T);
949 void VisitArrayType(const ArrayType *T) {
950 AddQualType(T->getElementType());
951 ID.AddInteger(llvm::to_underlying(T->getSizeModifier()));
952 VisitQualifiers(T->getIndexTypeQualifiers());
953 VisitType(T);
955 void VisitConstantArrayType(const ConstantArrayType *T) {
956 T->getSize().Profile(ID);
957 VisitArrayType(T);
960 void VisitArrayParameterType(const ArrayParameterType *T) {
961 VisitConstantArrayType(T);
964 void VisitDependentSizedArrayType(const DependentSizedArrayType *T) {
965 AddStmt(T->getSizeExpr());
966 VisitArrayType(T);
969 void VisitIncompleteArrayType(const IncompleteArrayType *T) {
970 VisitArrayType(T);
973 void VisitVariableArrayType(const VariableArrayType *T) {
974 AddStmt(T->getSizeExpr());
975 VisitArrayType(T);
978 void VisitAttributedType(const AttributedType *T) {
979 ID.AddInteger(T->getAttrKind());
980 AddQualType(T->getModifiedType());
982 VisitType(T);
985 void VisitBlockPointerType(const BlockPointerType *T) {
986 AddQualType(T->getPointeeType());
987 VisitType(T);
990 void VisitBuiltinType(const BuiltinType *T) {
991 ID.AddInteger(T->getKind());
992 VisitType(T);
995 void VisitComplexType(const ComplexType *T) {
996 AddQualType(T->getElementType());
997 VisitType(T);
1000 void VisitDecltypeType(const DecltypeType *T) {
1001 AddStmt(T->getUnderlyingExpr());
1002 VisitType(T);
1005 void VisitDependentDecltypeType(const DependentDecltypeType *T) {
1006 VisitDecltypeType(T);
1009 void VisitDeducedType(const DeducedType *T) {
1010 AddQualType(T->getDeducedType());
1011 VisitType(T);
1014 void VisitAutoType(const AutoType *T) {
1015 ID.AddInteger((unsigned)T->getKeyword());
1016 ID.AddInteger(T->isConstrained());
1017 if (T->isConstrained()) {
1018 AddDecl(T->getTypeConstraintConcept());
1019 ID.AddInteger(T->getTypeConstraintArguments().size());
1020 for (const auto &TA : T->getTypeConstraintArguments())
1023 VisitDeducedType(T);
1027 const DeducedTemplateSpecializationType *T) {
1028 Hash.AddTemplateName(T->getTemplateName());
1029 VisitDeducedType(T);
1032 void VisitDependentAddressSpaceType(const DependentAddressSpaceType *T) {
1033 AddQualType(T->getPointeeType());
1034 AddStmt(T->getAddrSpaceExpr());
1035 VisitType(T);
1038 void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T) {
1039 AddQualType(T->getElementType());
1040 AddStmt(T->getSizeExpr());
1041 VisitType(T);
1044 void VisitFunctionType(const FunctionType *T) {
1045 AddQualType(T->getReturnType());
1046 T->getExtInfo().Profile(ID);
1047 Hash.AddBoolean(T->isConst());
1048 Hash.AddBoolean(T->isVolatile());
1049 Hash.AddBoolean(T->isRestrict());
1050 VisitType(T);
1053 void VisitFunctionNoProtoType(const FunctionNoProtoType *T) {
1054 VisitFunctionType(T);
1057 void VisitFunctionProtoType(const FunctionProtoType *T) {
1058 ID.AddInteger(T->getNumParams());
1059 for (auto ParamType : T->getParamTypes())
1062 VisitFunctionType(T);
1065 void VisitInjectedClassNameType(const InjectedClassNameType *T) {
1066 AddDecl(T->getDecl());
1067 VisitType(T);
1070 void VisitMemberPointerType(const MemberPointerType *T) {
1071 AddQualType(T->getPointeeType());
1072 AddType(T->getClass());
1073 VisitType(T);
1076 void VisitObjCObjectPointerType(const ObjCObjectPointerType *T) {
1077 AddQualType(T->getPointeeType());
1078 VisitType(T);
1081 void VisitObjCObjectType(const ObjCObjectType *T) {
1082 AddDecl(T->getInterface());
1084 auto TypeArgs = T->getTypeArgsAsWritten();
1090 auto Protocols = T->getProtocols();
1096 Hash.AddBoolean(T->isKindOfType());
1098 VisitType(T);
1101 void VisitObjCInterfaceType(const ObjCInterfaceType *T) {
1103 VisitObjCObjectType(T);
1106 void VisitObjCTypeParamType(const ObjCTypeParamType *T) {
1107 AddDecl(T->getDecl());
1108 auto Protocols = T->getProtocols();
1114 VisitType(T);
1117 void VisitPackExpansionType(const PackExpansionType *T) {
1118 AddQualType(T->getPattern());
1119 VisitType(T);
1122 void VisitParenType(const ParenType *T) {
1123 AddQualType(T->getInnerType());
1124 VisitType(T);
1127 void VisitPipeType(const PipeType *T) {
1128 AddQualType(T->getElementType());
1129 Hash.AddBoolean(T->isReadOnly());
1130 VisitType(T);
1133 void VisitPointerType(const PointerType *T) {
1134 AddQualType(T->getPointeeType());
1135 VisitType(T);
1138 void VisitReferenceType(const ReferenceType *T) {
1139 AddQualType(T->getPointeeTypeAsWritten());
1140 VisitType(T);
1143 void VisitLValueReferenceType(const LValueReferenceType *T) {
1144 VisitReferenceType(T);
1147 void VisitRValueReferenceType(const RValueReferenceType *T) {
1148 VisitReferenceType(T);
1152 VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T) {
1153 AddDecl(T->getAssociatedDecl());
1154 Hash.AddTemplateArgument(T->getArgumentPack());
1155 VisitType(T);
1158 void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T) {
1159 AddDecl(T->getAssociatedDecl());
1160 AddQualType(T->getReplacementType());
1161 VisitType(T);
1164 void VisitTagType(const TagType *T) {
1165 AddDecl(T->getDecl());
1166 VisitType(T);
1169 void VisitRecordType(const RecordType *T) { VisitTagType(T); }
1170 void VisitEnumType(const EnumType *T) { VisitTagType(T); }
1172 void VisitTemplateSpecializationType(const TemplateSpecializationType *T) {
1173 ID.AddInteger(T->template_arguments().size());
1174 for (const auto &TA : T->template_arguments()) {
1177 Hash.AddTemplateName(T->getTemplateName());
1178 VisitType(T);
1181 void VisitTemplateTypeParmType(const TemplateTypeParmType *T) {
1182 ID.AddInteger(T->getDepth());
1183 ID.AddInteger(T->getIndex());
1184 Hash.AddBoolean(T->isParameterPack());
1185 AddDecl(T->getDecl());
1188 void VisitTypedefType(const TypedefType *T) {
1189 AddDecl(T->getDecl());
1190 VisitType(T);
1193 void VisitTypeOfExprType(const TypeOfExprType *T) {
1194 AddStmt(T->getUnderlyingExpr());
1195 Hash.AddBoolean(T->isSugared());
1197 VisitType(T);
1199 void VisitTypeOfType(const TypeOfType *T) {
1200 AddQualType(T->getUnmodifiedType());
1201 VisitType(T);
1204 void VisitTypeWithKeyword(const TypeWithKeyword *T) {
1205 ID.AddInteger(llvm::to_underlying(T->getKeyword()));
1206 VisitType(T);
1209 void VisitDependentNameType(const DependentNameType *T) {
1210 AddNestedNameSpecifier(T->getQualifier());
1211 AddIdentifierInfo(T->getIdentifier());
1212 VisitTypeWithKeyword(T);
1216 const DependentTemplateSpecializationType *T) {
1217 AddIdentifierInfo(T->getIdentifier());
1218 AddNestedNameSpecifier(T->getQualifier());
1219 ID.AddInteger(T->template_arguments().size());
1220 for (const auto &TA : T->template_arguments()) {
1223 VisitTypeWithKeyword(T);
1226 void VisitElaboratedType(const ElaboratedType *T) {
1227 AddNestedNameSpecifier(T->getQualifier());
1228 AddQualType(T->getNamedType());
1229 VisitTypeWithKeyword(T);
1232 void VisitUnaryTransformType(const UnaryTransformType *T) {
1233 AddQualType(T->getUnderlyingType());
1234 AddQualType(T->getBaseType());
1235 VisitType(T);
1238 void VisitUnresolvedUsingType(const UnresolvedUsingType *T) {
1239 AddDecl(T->getDecl());
1240 VisitType(T);
1243 void VisitVectorType(const VectorType *T) {
1244 AddQualType(T->getElementType());
1245 ID.AddInteger(T->getNumElements());
1246 ID.AddInteger(llvm::to_underlying(T->getVectorKind()));
1247 VisitType(T);
1250 void VisitExtVectorType(const ExtVectorType * T) {
1251 VisitVectorType(T);
1256 void ODRHash::AddType(const Type *T) {
1257 assert(T && "Expecting non-null pointer.");
1258 ODRTypeVisitor(ID, *this).Visit(T);
1261 void ODRHash::AddQualType(QualType T) {
1262 AddBoolean(T.isNull());
1263 if (T.isNull())
1265 SplitQualType split = T.split();