Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/clang/AST/AbstractTypeWriter.inc is written in an unsupported language. File is not indexed.

0001 /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
0002 |*                                                                            *|
0003 |* A CRTP writer for Clang Type nodes                                         *|
0004 |*                                                                            *|
0005 |* Automatically generated file, do not edit!                                 *|
0006 |* From: TypeProperties.td                                                    *|
0007 |*                                                                            *|
0008 \*===----------------------------------------------------------------------===*/
0009 
0010 template <class PropertyWriter>
0011 class AbstractTypeWriter {
0012 public:
0013   PropertyWriter &W;
0014 
0015   AbstractTypeWriter(PropertyWriter &W) : W(W) {}
0016 
0017   void write(const Type *node) {
0018     switch (node->getTypeClass()) {
0019     case Type::Adjusted:
0020       return writeAdjustedType(static_cast<const AdjustedType *>(node));
0021     case Type::Decayed:
0022       return writeDecayedType(static_cast<const DecayedType *>(node));
0023     case Type::ConstantArray:
0024       return writeConstantArrayType(static_cast<const ConstantArrayType *>(node));
0025     case Type::ArrayParameter:
0026       return writeArrayParameterType(static_cast<const ArrayParameterType *>(node));
0027     case Type::DependentSizedArray:
0028       return writeDependentSizedArrayType(static_cast<const DependentSizedArrayType *>(node));
0029     case Type::IncompleteArray:
0030       return writeIncompleteArrayType(static_cast<const IncompleteArrayType *>(node));
0031     case Type::VariableArray:
0032       return writeVariableArrayType(static_cast<const VariableArrayType *>(node));
0033     case Type::Atomic:
0034       return writeAtomicType(static_cast<const AtomicType *>(node));
0035     case Type::Attributed:
0036       return writeAttributedType(static_cast<const AttributedType *>(node));
0037     case Type::BTFTagAttributed:
0038       return writeBTFTagAttributedType(static_cast<const BTFTagAttributedType *>(node));
0039     case Type::BitInt:
0040       return writeBitIntType(static_cast<const BitIntType *>(node));
0041     case Type::BlockPointer:
0042       return writeBlockPointerType(static_cast<const BlockPointerType *>(node));
0043     case Type::CountAttributed:
0044       return writeCountAttributedType(static_cast<const CountAttributedType *>(node));
0045     case Type::Builtin:
0046       return writeBuiltinType(static_cast<const BuiltinType *>(node));
0047     case Type::Complex:
0048       return writeComplexType(static_cast<const ComplexType *>(node));
0049     case Type::Decltype:
0050       return writeDecltypeType(static_cast<const DecltypeType *>(node));
0051     case Type::Auto:
0052       return writeAutoType(static_cast<const AutoType *>(node));
0053     case Type::DeducedTemplateSpecialization:
0054       return writeDeducedTemplateSpecializationType(static_cast<const DeducedTemplateSpecializationType *>(node));
0055     case Type::DependentAddressSpace:
0056       return writeDependentAddressSpaceType(static_cast<const DependentAddressSpaceType *>(node));
0057     case Type::DependentBitInt:
0058       return writeDependentBitIntType(static_cast<const DependentBitIntType *>(node));
0059     case Type::DependentName:
0060       return writeDependentNameType(static_cast<const DependentNameType *>(node));
0061     case Type::DependentSizedExtVector:
0062       return writeDependentSizedExtVectorType(static_cast<const DependentSizedExtVectorType *>(node));
0063     case Type::DependentTemplateSpecialization:
0064       return writeDependentTemplateSpecializationType(static_cast<const DependentTemplateSpecializationType *>(node));
0065     case Type::DependentVector:
0066       return writeDependentVectorType(static_cast<const DependentVectorType *>(node));
0067     case Type::Elaborated:
0068       return writeElaboratedType(static_cast<const ElaboratedType *>(node));
0069     case Type::FunctionNoProto:
0070       return writeFunctionNoProtoType(static_cast<const FunctionNoProtoType *>(node));
0071     case Type::FunctionProto:
0072       return writeFunctionProtoType(static_cast<const FunctionProtoType *>(node));
0073     case Type::HLSLAttributedResource:
0074       return writeHLSLAttributedResourceType(static_cast<const HLSLAttributedResourceType *>(node));
0075     case Type::InjectedClassName:
0076       return writeInjectedClassNameType(static_cast<const InjectedClassNameType *>(node));
0077     case Type::MacroQualified:
0078       return writeMacroQualifiedType(static_cast<const MacroQualifiedType *>(node));
0079     case Type::ConstantMatrix:
0080       return writeConstantMatrixType(static_cast<const ConstantMatrixType *>(node));
0081     case Type::DependentSizedMatrix:
0082       return writeDependentSizedMatrixType(static_cast<const DependentSizedMatrixType *>(node));
0083     case Type::MemberPointer:
0084       return writeMemberPointerType(static_cast<const MemberPointerType *>(node));
0085     case Type::ObjCObjectPointer:
0086       return writeObjCObjectPointerType(static_cast<const ObjCObjectPointerType *>(node));
0087     case Type::ObjCObject:
0088       return writeObjCObjectType(static_cast<const ObjCObjectType *>(node));
0089     case Type::ObjCInterface:
0090       return writeObjCInterfaceType(static_cast<const ObjCInterfaceType *>(node));
0091     case Type::ObjCTypeParam:
0092       return writeObjCTypeParamType(static_cast<const ObjCTypeParamType *>(node));
0093     case Type::PackExpansion:
0094       return writePackExpansionType(static_cast<const PackExpansionType *>(node));
0095     case Type::PackIndexing:
0096       return writePackIndexingType(static_cast<const PackIndexingType *>(node));
0097     case Type::Paren:
0098       return writeParenType(static_cast<const ParenType *>(node));
0099     case Type::Pipe:
0100       return writePipeType(static_cast<const PipeType *>(node));
0101     case Type::Pointer:
0102       return writePointerType(static_cast<const PointerType *>(node));
0103     case Type::LValueReference:
0104       return writeLValueReferenceType(static_cast<const LValueReferenceType *>(node));
0105     case Type::RValueReference:
0106       return writeRValueReferenceType(static_cast<const RValueReferenceType *>(node));
0107     case Type::SubstTemplateTypeParmPack:
0108       return writeSubstTemplateTypeParmPackType(static_cast<const SubstTemplateTypeParmPackType *>(node));
0109     case Type::SubstTemplateTypeParm:
0110       return writeSubstTemplateTypeParmType(static_cast<const SubstTemplateTypeParmType *>(node));
0111     case Type::Enum:
0112       return writeEnumType(static_cast<const EnumType *>(node));
0113     case Type::Record:
0114       return writeRecordType(static_cast<const RecordType *>(node));
0115     case Type::TemplateSpecialization:
0116       return writeTemplateSpecializationType(static_cast<const TemplateSpecializationType *>(node));
0117     case Type::TemplateTypeParm:
0118       return writeTemplateTypeParmType(static_cast<const TemplateTypeParmType *>(node));
0119     case Type::TypeOfExpr:
0120       return writeTypeOfExprType(static_cast<const TypeOfExprType *>(node));
0121     case Type::TypeOf:
0122       return writeTypeOfType(static_cast<const TypeOfType *>(node));
0123     case Type::Typedef:
0124       return writeTypedefType(static_cast<const TypedefType *>(node));
0125     case Type::UnaryTransform:
0126       return writeUnaryTransformType(static_cast<const UnaryTransformType *>(node));
0127     case Type::UnresolvedUsing:
0128       return writeUnresolvedUsingType(static_cast<const UnresolvedUsingType *>(node));
0129     case Type::Using:
0130       return writeUsingType(static_cast<const UsingType *>(node));
0131     case Type::Vector:
0132       return writeVectorType(static_cast<const VectorType *>(node));
0133     case Type::ExtVector:
0134       return writeExtVectorType(static_cast<const ExtVectorType *>(node));
0135     }
0136     llvm_unreachable("bad kind");
0137   }
0138 
0139   void writeAdjustedType(const AdjustedType *node) {
0140     QualType originalType = ( node->getOriginalType() );
0141     W.find("originalType").writeQualType(originalType);
0142     QualType adjustedType = ( node->getAdjustedType() );
0143     W.find("adjustedType").writeQualType(adjustedType);
0144   }
0145 
0146   void writeDecayedType(const DecayedType *node) {
0147     QualType originalType = ( node->getOriginalType() );
0148     W.find("originalType").writeQualType(originalType);
0149   }
0150 
0151   void writeConstantArrayType(const ConstantArrayType *node) {
0152     llvm::APInt sizeValue = ( node->getSize() );
0153     W.find("sizeValue").writeAPInt(sizeValue);
0154     const Expr* size = ( node->getSizeExpr() );
0155     W.find("size").writeExprRef(size);
0156     QualType elementType = ( node->getElementType() );
0157     W.find("elementType").writeQualType(elementType);
0158     ArraySizeModifier sizeModifier = ( node->getSizeModifier() );
0159     W.find("sizeModifier").writeArraySizeModifier(sizeModifier);
0160     Qualifiers indexQualifiers = ( Qualifiers::fromCVRMask(node->getIndexTypeCVRQualifiers()) );
0161     W.find("indexQualifiers").writeQualifiers(indexQualifiers);
0162   }
0163 
0164   void writeArrayParameterType(const ArrayParameterType *node) {
0165     llvm::APInt sizeValue = ( node->getSize() );
0166     W.find("sizeValue").writeAPInt(sizeValue);
0167     const Expr* size = ( node->getSizeExpr() );
0168     W.find("size").writeExprRef(size);
0169     QualType elementType = ( node->getElementType() );
0170     W.find("elementType").writeQualType(elementType);
0171     ArraySizeModifier sizeModifier = ( node->getSizeModifier() );
0172     W.find("sizeModifier").writeArraySizeModifier(sizeModifier);
0173     Qualifiers indexQualifiers = ( Qualifiers::fromCVRMask(node->getIndexTypeCVRQualifiers()) );
0174     W.find("indexQualifiers").writeQualifiers(indexQualifiers);
0175   }
0176 
0177   void writeDependentSizedArrayType(const DependentSizedArrayType *node) {
0178     const Expr* size = ( node->getSizeExpr() );
0179     W.find("size").writeExprRef(size);
0180     SourceLocation leftBracketLoc = ( node->getLBracketLoc() );
0181     W.find("leftBracketLoc").writeSourceLocation(leftBracketLoc);
0182     SourceLocation rightBracketLoc = ( node->getRBracketLoc() );
0183     W.find("rightBracketLoc").writeSourceLocation(rightBracketLoc);
0184     QualType elementType = ( node->getElementType() );
0185     W.find("elementType").writeQualType(elementType);
0186     ArraySizeModifier sizeModifier = ( node->getSizeModifier() );
0187     W.find("sizeModifier").writeArraySizeModifier(sizeModifier);
0188     Qualifiers indexQualifiers = ( Qualifiers::fromCVRMask(node->getIndexTypeCVRQualifiers()) );
0189     W.find("indexQualifiers").writeQualifiers(indexQualifiers);
0190   }
0191 
0192   void writeIncompleteArrayType(const IncompleteArrayType *node) {
0193     QualType elementType = ( node->getElementType() );
0194     W.find("elementType").writeQualType(elementType);
0195     ArraySizeModifier sizeModifier = ( node->getSizeModifier() );
0196     W.find("sizeModifier").writeArraySizeModifier(sizeModifier);
0197     Qualifiers indexQualifiers = ( Qualifiers::fromCVRMask(node->getIndexTypeCVRQualifiers()) );
0198     W.find("indexQualifiers").writeQualifiers(indexQualifiers);
0199   }
0200 
0201   void writeVariableArrayType(const VariableArrayType *node) {
0202     SourceLocation leftBracketLoc = ( node->getLBracketLoc() );
0203     W.find("leftBracketLoc").writeSourceLocation(leftBracketLoc);
0204     SourceLocation rightBracketLoc = ( node->getRBracketLoc() );
0205     W.find("rightBracketLoc").writeSourceLocation(rightBracketLoc);
0206     const Expr* size = ( node->getSizeExpr() );
0207     W.find("size").writeExprRef(size);
0208     QualType elementType = ( node->getElementType() );
0209     W.find("elementType").writeQualType(elementType);
0210     ArraySizeModifier sizeModifier = ( node->getSizeModifier() );
0211     W.find("sizeModifier").writeArraySizeModifier(sizeModifier);
0212     Qualifiers indexQualifiers = ( Qualifiers::fromCVRMask(node->getIndexTypeCVRQualifiers()) );
0213     W.find("indexQualifiers").writeQualifiers(indexQualifiers);
0214   }
0215 
0216   void writeAtomicType(const AtomicType *node) {
0217     QualType valueType = ( node->getValueType() );
0218     W.find("valueType").writeQualType(valueType);
0219   }
0220 
0221   void writeAttributedType(const AttributedType *node) {
0222     QualType modifiedType = ( node->getModifiedType() );
0223     W.find("modifiedType").writeQualType(modifiedType);
0224     QualType equivalentType = ( node->getEquivalentType() );
0225     W.find("equivalentType").writeQualType(equivalentType);
0226     attr::Kind attrKind = ( node->getAttrKind() );
0227     W.find("attrKind").writeAttrKind(attrKind);
0228     const Attr * attribute = ( node->getAttr() );
0229     W.find("attribute").writeAttr(attribute);
0230   }
0231 
0232   void writeBTFTagAttributedType(const BTFTagAttributedType *node) {
0233     const BTFTypeTagAttr * attr = ( node->getAttr() );
0234     W.find("attr").writeBTFTypeTagAttr(attr);
0235     QualType wrappedType = ( node->getWrappedType() );
0236     W.find("wrappedType").writeQualType(wrappedType);
0237   }
0238 
0239   void writeBitIntType(const BitIntType *node) {
0240     bool isUnsigned = ( node->isUnsigned() );
0241     W.find("isUnsigned").writeBool(isUnsigned);
0242     uint32_t numBits = ( node->getNumBits() );
0243     W.find("numBits").writeUInt32(numBits);
0244   }
0245 
0246   void writeBlockPointerType(const BlockPointerType *node) {
0247     QualType pointeeType = ( node->getPointeeType() );
0248     W.find("pointeeType").writeQualType(pointeeType);
0249   }
0250 
0251   void writeCountAttributedType(const CountAttributedType *node) {
0252     QualType WrappedTy = ( node->desugar() );
0253     W.find("WrappedTy").writeQualType(WrappedTy);
0254     const Expr* CountExpr = ( node->getCountExpr() );
0255     W.find("CountExpr").writeExprRef(CountExpr);
0256     bool CountInBytes = ( node->isCountInBytes() );
0257     W.find("CountInBytes").writeBool(CountInBytes);
0258     bool OrNull = ( node->isOrNull() );
0259     W.find("OrNull").writeBool(OrNull);
0260     llvm::ArrayRef<TypeCoupledDeclRefInfo> CoupledDecls = ( node->getCoupledDecls() );
0261     W.find("CoupledDecls").writeArray(CoupledDecls);
0262   }
0263 
0264   void writeBuiltinType(const BuiltinType *node) {
0265     BuiltinType::Kind kind = ( node->getKind() );
0266     W.find("kind").writeBuiltinTypeKind(kind);
0267   }
0268 
0269   void writeComplexType(const ComplexType *node) {
0270     QualType elementType = ( node->getElementType() );
0271     W.find("elementType").writeQualType(elementType);
0272   }
0273 
0274   void writeDecltypeType(const DecltypeType *node) {
0275     QualType underlyingType = ( node->getUnderlyingType() );
0276     W.find("underlyingType").writeQualType(underlyingType);
0277     const Expr* expression = ( node->getUnderlyingExpr() );
0278     W.find("expression").writeExprRef(expression);
0279   }
0280 
0281   void writeAutoType(const AutoType *node) {
0282     std::optional<QualType> deducedType = ( makeOptionalFromNullable(node->getDeducedType()) );
0283     W.find("deducedType").writeOptional(deducedType);
0284     AutoTypeKeyword keyword = ( node->getKeyword() );
0285     W.find("keyword").writeAutoTypeKeyword(keyword);
0286     std::optional<const ConceptDecl*> typeConstraintConcept = ( makeOptionalFromPointer(
0287         const_cast<const ConceptDecl*>(node->getTypeConstraintConcept())) );
0288     W.find("typeConstraintConcept").writeOptional(typeConstraintConcept);
0289     llvm::ArrayRef<TemplateArgument> typeConstraintArguments = ( node->getTypeConstraintArguments() );
0290     W.find("typeConstraintArguments").writeArray(typeConstraintArguments);
0291     uint32_t dependence = ( !node->getDeducedType().isNull() ? 0 :
0292                   node->containsUnexpandedParameterPack() ? 2 :
0293                   node->isDependentType() ? 1 : 0 );
0294     W.find("dependence").writeUInt32(dependence);
0295   }
0296 
0297   void writeDeducedTemplateSpecializationType(const DeducedTemplateSpecializationType *node) {
0298     std::optional<TemplateName> templateName = ( makeOptionalFromNullable(node->getTemplateName()) );
0299     W.find("templateName").writeOptional(templateName);
0300     QualType deducedType = ( node->getDeducedType() );
0301     W.find("deducedType").writeQualType(deducedType);
0302     bool dependent = ( !node->getDeducedType().isNull()
0303                     ? false : node->isDependentType() );
0304     W.find("dependent").writeBool(dependent);
0305   }
0306 
0307   void writeDependentAddressSpaceType(const DependentAddressSpaceType *node) {
0308     QualType pointeeType = ( node->getPointeeType() );
0309     W.find("pointeeType").writeQualType(pointeeType);
0310     const Expr* addressSpace = ( node->getAddrSpaceExpr() );
0311     W.find("addressSpace").writeExprRef(addressSpace);
0312     SourceLocation attributeLoc = ( node->getAttributeLoc() );
0313     W.find("attributeLoc").writeSourceLocation(attributeLoc);
0314   }
0315 
0316   void writeDependentBitIntType(const DependentBitIntType *node) {
0317     bool isUnsigned = ( node->isUnsigned() );
0318     W.find("isUnsigned").writeBool(isUnsigned);
0319     const Expr* numBitsExpr = ( node->getNumBitsExpr() );
0320     W.find("numBitsExpr").writeExprRef(numBitsExpr);
0321   }
0322 
0323   void writeDependentNameType(const DependentNameType *node) {
0324     ElaboratedTypeKeyword keyword = ( node->getKeyword() );
0325     W.find("keyword").writeElaboratedTypeKeyword(keyword);
0326     NestedNameSpecifier * qualifier = ( node->getQualifier() );
0327     W.find("qualifier").writeNestedNameSpecifier(qualifier);
0328     const IdentifierInfo* name = ( node->getIdentifier() );
0329     W.find("name").writeIdentifier(name);
0330     std::optional<QualType> underlyingType = (
0331       node->isCanonicalUnqualified()
0332         ? std::nullopt
0333         : std::optional<QualType>(node->getCanonicalTypeInternal())
0334     );
0335     W.find("underlyingType").writeOptional(underlyingType);
0336   }
0337 
0338   void writeDependentSizedExtVectorType(const DependentSizedExtVectorType *node) {
0339     QualType elementType = ( node->getElementType() );
0340     W.find("elementType").writeQualType(elementType);
0341     const Expr* size = ( node->getSizeExpr() );
0342     W.find("size").writeExprRef(size);
0343     SourceLocation attributeLoc = ( node->getAttributeLoc() );
0344     W.find("attributeLoc").writeSourceLocation(attributeLoc);
0345   }
0346 
0347   void writeDependentTemplateSpecializationType(const DependentTemplateSpecializationType *node) {
0348     ElaboratedTypeKeyword keyword = ( node->getKeyword() );
0349     W.find("keyword").writeElaboratedTypeKeyword(keyword);
0350     NestedNameSpecifier * qualifier = ( node->getQualifier() );
0351     W.find("qualifier").writeNestedNameSpecifier(qualifier);
0352     const IdentifierInfo* name = ( node->getIdentifier() );
0353     W.find("name").writeIdentifier(name);
0354     llvm::ArrayRef<TemplateArgument> templateArguments = ( node->template_arguments() );
0355     W.find("templateArguments").writeArray(templateArguments);
0356   }
0357 
0358   void writeDependentVectorType(const DependentVectorType *node) {
0359     QualType elementType = ( node->getElementType() );
0360     W.find("elementType").writeQualType(elementType);
0361     const Expr* size = ( node->getSizeExpr() );
0362     W.find("size").writeExprRef(size);
0363     SourceLocation attributeLoc = ( node->getAttributeLoc() );
0364     W.find("attributeLoc").writeSourceLocation(attributeLoc);
0365     VectorKind vectorKind = ( node->getVectorKind() );
0366     W.find("vectorKind").writeVectorKind(vectorKind);
0367   }
0368 
0369   void writeElaboratedType(const ElaboratedType *node) {
0370     ElaboratedTypeKeyword keyword = ( node->getKeyword() );
0371     W.find("keyword").writeElaboratedTypeKeyword(keyword);
0372     NestedNameSpecifier * qualifier = ( node->getQualifier() );
0373     W.find("qualifier").writeNestedNameSpecifier(qualifier);
0374     QualType namedType = ( node->getNamedType() );
0375     W.find("namedType").writeQualType(namedType);
0376     std::optional<const TagDecl*> ownedTag = ( makeOptionalFromPointer(
0377                     const_cast<const TagDecl *>(node->getOwnedTagDecl())) );
0378     W.find("ownedTag").writeOptional(ownedTag);
0379   }
0380 
0381   void writeFunctionNoProtoType(const FunctionNoProtoType *node) {
0382     QualType returnType = ( node->getReturnType() );
0383     W.find("returnType").writeQualType(returnType);
0384     bool noReturn = ( node->getExtInfo().getNoReturn() );
0385     W.find("noReturn").writeBool(noReturn);
0386     bool hasRegParm = ( node->getExtInfo().getHasRegParm() );
0387     W.find("hasRegParm").writeBool(hasRegParm);
0388     uint32_t regParm = ( node->getExtInfo().getRegParm() );
0389     W.find("regParm").writeUInt32(regParm);
0390     CallingConv callingConvention = ( node->getExtInfo().getCC() );
0391     W.find("callingConvention").writeCallingConv(callingConvention);
0392     bool producesResult = ( node->getExtInfo().getProducesResult() );
0393     W.find("producesResult").writeBool(producesResult);
0394     bool noCallerSavedRegs = ( node->getExtInfo().getNoCallerSavedRegs() );
0395     W.find("noCallerSavedRegs").writeBool(noCallerSavedRegs);
0396     bool noCfCheck = ( node->getExtInfo().getNoCfCheck() );
0397     W.find("noCfCheck").writeBool(noCfCheck);
0398     bool cmseNSCall = ( node->getExtInfo().getCmseNSCall() );
0399     W.find("cmseNSCall").writeBool(cmseNSCall);
0400   }
0401 
0402   void writeFunctionProtoType(const FunctionProtoType *node) {
0403     bool variadic = ( node->isVariadic() );
0404     W.find("variadic").writeBool(variadic);
0405     bool trailingReturn = ( node->hasTrailingReturn() );
0406     W.find("trailingReturn").writeBool(trailingReturn);
0407     Qualifiers methodQualifiers = ( node->getMethodQuals() );
0408     W.find("methodQualifiers").writeQualifiers(methodQualifiers);
0409     RefQualifierKind refQualifier = ( node->getRefQualifier() );
0410     W.find("refQualifier").writeRefQualifierKind(refQualifier);
0411     FunctionProtoType::ExceptionSpecInfo exceptionSpecifier = ( node->getExceptionSpecInfo() );
0412     W.find("exceptionSpecifier").writeExceptionSpecInfo(exceptionSpecifier);
0413     llvm::ArrayRef<QualType> parameters = ( node->getParamTypes() );
0414     W.find("parameters").writeArray(parameters);
0415     llvm::ArrayRef<FunctionProtoType::ExtParameterInfo> extParameterInfo = ( node->hasExtParameterInfos()
0416                     ? node->getExtParameterInfos()
0417                     : llvm::ArrayRef<FunctionProtoType::ExtParameterInfo>() );
0418     W.find("extParameterInfo").writeArray(extParameterInfo);
0419     uint32_t AArch64SMEAttributes = ( node->getAArch64SMEAttributes() );
0420     W.find("AArch64SMEAttributes").writeUInt32(AArch64SMEAttributes);
0421     llvm::ArrayRef<FunctionEffect> functionEffects = ( node->getFunctionEffectsWithoutConditions() );
0422     W.find("functionEffects").writeArray(functionEffects);
0423     llvm::ArrayRef<EffectConditionExpr> functionEffectConds = ( node->getFunctionEffectConditions() );
0424     W.find("functionEffectConds").writeArray(functionEffectConds);
0425     QualType returnType = ( node->getReturnType() );
0426     W.find("returnType").writeQualType(returnType);
0427     bool noReturn = ( node->getExtInfo().getNoReturn() );
0428     W.find("noReturn").writeBool(noReturn);
0429     bool hasRegParm = ( node->getExtInfo().getHasRegParm() );
0430     W.find("hasRegParm").writeBool(hasRegParm);
0431     uint32_t regParm = ( node->getExtInfo().getRegParm() );
0432     W.find("regParm").writeUInt32(regParm);
0433     CallingConv callingConvention = ( node->getExtInfo().getCC() );
0434     W.find("callingConvention").writeCallingConv(callingConvention);
0435     bool producesResult = ( node->getExtInfo().getProducesResult() );
0436     W.find("producesResult").writeBool(producesResult);
0437     bool noCallerSavedRegs = ( node->getExtInfo().getNoCallerSavedRegs() );
0438     W.find("noCallerSavedRegs").writeBool(noCallerSavedRegs);
0439     bool noCfCheck = ( node->getExtInfo().getNoCfCheck() );
0440     W.find("noCfCheck").writeBool(noCfCheck);
0441     bool cmseNSCall = ( node->getExtInfo().getCmseNSCall() );
0442     W.find("cmseNSCall").writeBool(cmseNSCall);
0443   }
0444 
0445   void writeHLSLAttributedResourceType(const HLSLAttributedResourceType *node) {
0446     uint32_t resClass = ( static_cast<uint32_t>(node->getAttrs().ResourceClass) );
0447     W.find("resClass").writeUInt32(resClass);
0448     bool isROV = ( node->getAttrs().IsROV );
0449     W.find("isROV").writeBool(isROV);
0450     bool rawBuffer = ( node->getAttrs().RawBuffer );
0451     W.find("rawBuffer").writeBool(rawBuffer);
0452     QualType wrappedTy = ( node->getWrappedType() );
0453     W.find("wrappedTy").writeQualType(wrappedTy);
0454     QualType containedTy = ( node->getContainedType() );
0455     W.find("containedTy").writeQualType(containedTy);
0456   }
0457 
0458   void writeInjectedClassNameType(const InjectedClassNameType *node) {
0459     const Decl* declaration = ( node->getDecl()->getCanonicalDecl() );
0460     W.find("declaration").writeDeclRef(declaration);
0461     QualType injectedSpecializationType = ( node->getInjectedSpecializationType() );
0462     W.find("injectedSpecializationType").writeQualType(injectedSpecializationType);
0463   }
0464 
0465   void writeMacroQualifiedType(const MacroQualifiedType *node) {
0466     QualType underlyingType = ( node->getUnderlyingType() );
0467     W.find("underlyingType").writeQualType(underlyingType);
0468     const IdentifierInfo* macroIdentifier = ( node->getMacroIdentifier() );
0469     W.find("macroIdentifier").writeIdentifier(macroIdentifier);
0470   }
0471 
0472   void writeConstantMatrixType(const ConstantMatrixType *node) {
0473     uint32_t numRows = ( node->getNumRows() );
0474     W.find("numRows").writeUInt32(numRows);
0475     uint32_t numColumns = ( node->getNumColumns() );
0476     W.find("numColumns").writeUInt32(numColumns);
0477     QualType elementType = ( node->getElementType() );
0478     W.find("elementType").writeQualType(elementType);
0479   }
0480 
0481   void writeDependentSizedMatrixType(const DependentSizedMatrixType *node) {
0482     const Expr* rows = ( node->getRowExpr() );
0483     W.find("rows").writeExprRef(rows);
0484     const Expr* columns = ( node->getColumnExpr() );
0485     W.find("columns").writeExprRef(columns);
0486     SourceLocation attributeLoc = ( node->getAttributeLoc() );
0487     W.find("attributeLoc").writeSourceLocation(attributeLoc);
0488     QualType elementType = ( node->getElementType() );
0489     W.find("elementType").writeQualType(elementType);
0490   }
0491 
0492   void writeMemberPointerType(const MemberPointerType *node) {
0493     QualType pointeeType = ( node->getPointeeType() );
0494     W.find("pointeeType").writeQualType(pointeeType);
0495     QualType baseType = ( QualType(node->getClass(), 0) );
0496     W.find("baseType").writeQualType(baseType);
0497   }
0498 
0499   void writeObjCObjectPointerType(const ObjCObjectPointerType *node) {
0500     QualType pointeeType = ( node->getPointeeType() );
0501     W.find("pointeeType").writeQualType(pointeeType);
0502   }
0503 
0504   void writeObjCObjectType(const ObjCObjectType *node) {
0505     QualType baseType = ( node->getBaseType() );
0506     W.find("baseType").writeQualType(baseType);
0507     llvm::ArrayRef<QualType> typeArgsAsWritten = ( node->getTypeArgsAsWritten() );
0508     W.find("typeArgsAsWritten").writeArray(typeArgsAsWritten);
0509     llvm::ArrayRef<const ObjCProtocolDecl*> qualifiers = ( node->getProtocols() );
0510     W.find("qualifiers").writeArray(qualifiers);
0511     bool isKindOfTypeAsWritten = ( node->isKindOfTypeAsWritten() );
0512     W.find("isKindOfTypeAsWritten").writeBool(isKindOfTypeAsWritten);
0513   }
0514 
0515   void writeObjCInterfaceType(const ObjCInterfaceType *node) {
0516     const Decl* declaration = ( node->getDecl()->getCanonicalDecl() );
0517     W.find("declaration").writeDeclRef(declaration);
0518   }
0519 
0520   void writeObjCTypeParamType(const ObjCTypeParamType *node) {
0521     const ObjCTypeParamDecl* declaration = ( node->getDecl() );
0522     W.find("declaration").writeObjCTypeParamDeclRef(declaration);
0523     llvm::ArrayRef<const ObjCProtocolDecl*> qualifiers = ( node->getProtocols() );
0524     W.find("qualifiers").writeArray(qualifiers);
0525   }
0526 
0527   void writePackExpansionType(const PackExpansionType *node) {
0528     QualType pattern = ( node->getPattern() );
0529     W.find("pattern").writeQualType(pattern);
0530     std::optional<uint32_t> numExpansions = ( node->getNumExpansions() );
0531     W.find("numExpansions").writeOptional(numExpansions);
0532   }
0533 
0534   void writePackIndexingType(const PackIndexingType *node) {
0535     QualType pattern = ( node->getPattern() );
0536     W.find("pattern").writeQualType(pattern);
0537     const Expr* indexExpression = ( node->getIndexExpr() );
0538     W.find("indexExpression").writeExprRef(indexExpression);
0539     bool isFullySubstituted = ( node->isFullySubstituted() );
0540     W.find("isFullySubstituted").writeBool(isFullySubstituted);
0541   }
0542 
0543   void writeParenType(const ParenType *node) {
0544     QualType innerType = ( node->getInnerType() );
0545     W.find("innerType").writeQualType(innerType);
0546   }
0547 
0548   void writePipeType(const PipeType *node) {
0549     QualType elementType = ( node->getElementType() );
0550     W.find("elementType").writeQualType(elementType);
0551     bool isReadOnly = ( node->isReadOnly() );
0552     W.find("isReadOnly").writeBool(isReadOnly);
0553   }
0554 
0555   void writePointerType(const PointerType *node) {
0556     QualType pointeeType = ( node->getPointeeType() );
0557     W.find("pointeeType").writeQualType(pointeeType);
0558   }
0559 
0560   void writeLValueReferenceType(const LValueReferenceType *node) {
0561     bool isSpelledAsLValue = ( node->isSpelledAsLValue() );
0562     W.find("isSpelledAsLValue").writeBool(isSpelledAsLValue);
0563     QualType pointeeTypeAsWritten = ( node->getPointeeTypeAsWritten() );
0564     W.find("pointeeTypeAsWritten").writeQualType(pointeeTypeAsWritten);
0565   }
0566 
0567   void writeRValueReferenceType(const RValueReferenceType *node) {
0568     QualType pointeeTypeAsWritten = ( node->getPointeeTypeAsWritten() );
0569     W.find("pointeeTypeAsWritten").writeQualType(pointeeTypeAsWritten);
0570   }
0571 
0572   void writeSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *node) {
0573     const Decl* associatedDecl = ( node->getAssociatedDecl() );
0574     W.find("associatedDecl").writeDeclRef(associatedDecl);
0575     uint32_t Index = ( node->getIndex() );
0576     W.find("Index").writeUInt32(Index);
0577     bool Final = ( node->getFinal() );
0578     W.find("Final").writeBool(Final);
0579     TemplateArgument replacementPack = ( node->getArgumentPack() );
0580     W.find("replacementPack").writeTemplateArgument(replacementPack);
0581   }
0582 
0583   void writeSubstTemplateTypeParmType(const SubstTemplateTypeParmType *node) {
0584     QualType replacementType = ( node->getReplacementType() );
0585     W.find("replacementType").writeQualType(replacementType);
0586     const Decl* associatedDecl = ( node->getAssociatedDecl() );
0587     W.find("associatedDecl").writeDeclRef(associatedDecl);
0588     uint32_t Index = ( node->getIndex() );
0589     W.find("Index").writeUInt32(Index);
0590     std::optional<uint32_t> PackIndex = ( node->getPackIndex() );
0591     W.find("PackIndex").writeOptional(PackIndex);
0592     SubstTemplateTypeParmTypeFlag SubstitutionFlag = ( node->getSubstitutionFlag() );
0593     W.find("SubstitutionFlag").writeSubstTemplateTypeParmTypeFlag(SubstitutionFlag);
0594   }
0595 
0596   void writeEnumType(const EnumType *node) {
0597     bool dependent = ( node->isDependentType() );
0598     W.find("dependent").writeBool(dependent);
0599     const Decl* declaration = ( node->getDecl()->getCanonicalDecl() );
0600     W.find("declaration").writeDeclRef(declaration);
0601   }
0602 
0603   void writeRecordType(const RecordType *node) {
0604     bool dependent = ( node->isDependentType() );
0605     W.find("dependent").writeBool(dependent);
0606     const Decl* declaration = ( node->getDecl()->getCanonicalDecl() );
0607     W.find("declaration").writeDeclRef(declaration);
0608   }
0609 
0610   void writeTemplateSpecializationType(const TemplateSpecializationType *node) {
0611     bool dependent = ( node->isDependentType() );
0612     W.find("dependent").writeBool(dependent);
0613     TemplateName templateName = ( node->getTemplateName() );
0614     W.find("templateName").writeTemplateName(templateName);
0615     llvm::ArrayRef<TemplateArgument> templateArguments = ( node->template_arguments() );
0616     W.find("templateArguments").writeArray(templateArguments);
0617     std::optional<QualType> underlyingType = (
0618       node->isTypeAlias()
0619         ? std::optional<QualType>(node->getAliasedType())
0620         : node->isCanonicalUnqualified()
0621             ? std::nullopt
0622             : std::optional<QualType>(node->getCanonicalTypeInternal())
0623     );
0624     W.find("underlyingType").writeOptional(underlyingType);
0625   }
0626 
0627   void writeTemplateTypeParmType(const TemplateTypeParmType *node) {
0628     uint32_t depth = ( node->getDepth() );
0629     W.find("depth").writeUInt32(depth);
0630     uint32_t index = ( node->getIndex() );
0631     W.find("index").writeUInt32(index);
0632     bool isParameterPack = ( node->isParameterPack() );
0633     W.find("isParameterPack").writeBool(isParameterPack);
0634     std::optional<const TemplateTypeParmDecl*> declaration = ( makeOptionalFromPointer(
0635                     const_cast<const TemplateTypeParmDecl*>(node->getDecl())) );
0636     W.find("declaration").writeOptional(declaration);
0637   }
0638 
0639   void writeTypeOfExprType(const TypeOfExprType *node) {
0640     const Expr* expression = ( node->getUnderlyingExpr() );
0641     W.find("expression").writeExprRef(expression);
0642     TypeOfKind kind = ( node->getKind() );
0643     W.find("kind").writeTypeOfKind(kind);
0644   }
0645 
0646   void writeTypeOfType(const TypeOfType *node) {
0647     QualType unmodifiedType = ( node->getUnmodifiedType() );
0648     W.find("unmodifiedType").writeQualType(unmodifiedType);
0649     TypeOfKind kind = ( node->getKind() );
0650     W.find("kind").writeTypeOfKind(kind);
0651   }
0652 
0653   void writeTypedefType(const TypedefType *node) {
0654     const Decl* declaration = ( node->getDecl() );
0655     W.find("declaration").writeDeclRef(declaration);
0656     QualType underlyingType = ( node->desugar() );
0657     W.find("underlyingType").writeQualType(underlyingType);
0658   }
0659 
0660   void writeUnaryTransformType(const UnaryTransformType *node) {
0661     QualType baseType = ( node->getBaseType() );
0662     W.find("baseType").writeQualType(baseType);
0663     QualType underlyingType = ( node->getUnderlyingType() );
0664     W.find("underlyingType").writeQualType(underlyingType);
0665     UnaryTransformType::UTTKind transform = ( node->getUTTKind() );
0666     W.find("transform").writeUnaryTypeTransformKind(transform);
0667   }
0668 
0669   void writeUnresolvedUsingType(const UnresolvedUsingType *node) {
0670     const Decl* declaration = ( node->getDecl() );
0671     W.find("declaration").writeDeclRef(declaration);
0672   }
0673 
0674   void writeUsingType(const UsingType *node) {
0675     const UsingShadowDecl* foundDeclaration = ( node->getFoundDecl() );
0676     W.find("foundDeclaration").writeUsingShadowDeclRef(foundDeclaration);
0677     QualType underlyingType = ( node->getUnderlyingType() );
0678     W.find("underlyingType").writeQualType(underlyingType);
0679   }
0680 
0681   void writeVectorType(const VectorType *node) {
0682     QualType elementType = ( node->getElementType() );
0683     W.find("elementType").writeQualType(elementType);
0684     uint32_t numElements = ( node->getNumElements() );
0685     W.find("numElements").writeUInt32(numElements);
0686     VectorKind vectorKind = ( node->getVectorKind() );
0687     W.find("vectorKind").writeVectorKind(vectorKind);
0688   }
0689 
0690   void writeExtVectorType(const ExtVectorType *node) {
0691     QualType elementType = ( node->getElementType() );
0692     W.find("elementType").writeQualType(elementType);
0693     uint32_t numElements = ( node->getNumElements() );
0694     W.find("numElements").writeUInt32(numElements);
0695   }
0696 
0697 };
0698