// ---------------------------------------------------------------------------- // // This is autogenerated code by CppSharp. // Do not edit this file or all your changes will be lost after re-generation. // // ---------------------------------------------------------------------------- #include "AST.h" #include "Parser.h" #include #include namespace CppSharp::CppParser { using namespace AST; AST::Expr* Parser::WalkExpression(const clang::Expr* Expr) { if (Expr == nullptr) return nullptr; AST::Expr* _Expr= 0; switch (Expr->getStmtClass()) { case clang::Stmt::ConstantExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ConstantExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _Expr = _S; break; } case clang::Stmt::OpaqueValueExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::OpaqueValueExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->isUnique = S->isUnique(); _S->sourceExpr = static_cast(WalkExpression(S->getSourceExpr())); _Expr = _S; break; } case clang::Stmt::DeclRefExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::DeclRefExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->hadMultipleCandidates = S->hadMultipleCandidates(); _S->hasQualifier = S->hasQualifier(); _S->foundDecl = static_cast(WalkDeclaration(S->getFoundDecl())); _S->hasTemplateKWAndArgsInfo = S->hasTemplateKWAndArgsInfo(); _S->hasTemplateKeyword = S->hasTemplateKeyword(); _S->hasExplicitTemplateArgs = S->hasExplicitTemplateArgs(); _S->numTemplateArgs = S->getNumTemplateArgs(); _S->refersToEnclosingVariableOrCapture = S->refersToEnclosingVariableOrCapture(); _Expr = _S; break; } case clang::Stmt::IntegerLiteralClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::IntegerLiteral(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->value = S->getValue().getLimitedValue(); _Expr = _S; break; } case clang::Stmt::FixedPointLiteralClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::FixedPointLiteral(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->value = S->getValue().getLimitedValue(); _Expr = _S; break; } case clang::Stmt::CharacterLiteralClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CharacterLiteral(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->kind = (CharacterLiteral::CharacterKind) S->getKind(); _S->value = S->getValue(); _Expr = _S; break; } case clang::Stmt::FloatingLiteralClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::FloatingLiteral(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->exact = S->isExact(); _S->valueAsApproximateDouble = S->getValueAsApproximateDouble(); _Expr = _S; break; } case clang::Stmt::ImaginaryLiteralClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ImaginaryLiteral(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _Expr = _S; break; } case clang::Stmt::StringLiteralClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::StringLiteral(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->string = S->getString().str(); _S->bytes = S->getBytes().str(); _S->byteLength = S->getByteLength(); _S->length = S->getLength(); _S->charByteWidth = S->getCharByteWidth(); _S->kind = (StringLiteral::StringKind) S->getKind(); _S->isAscii = S->isOrdinary(); _S->isWide = S->isWide(); _S->isUTF8 = S->isUTF8(); _S->isUTF16 = S->isUTF16(); _S->isUTF32 = S->isUTF32(); _S->isPascal = S->isPascal(); _S->containsNonAscii = S->containsNonAscii(); _S->containsNonAsciiOrNull = S->containsNonAsciiOrNull(); _S->numConcatenated = S->getNumConcatenated(); _Expr = _S; break; } case clang::Stmt::PredefinedExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::PredefinedExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->identKind = (PredefinedExpr::IdentKind) S->getIdentKind(); _Expr = _S; break; } case clang::Stmt::ParenExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ParenExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _Expr = _S; break; } case clang::Stmt::UnaryOperatorClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::UnaryOperator(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->opcode = (UnaryOperatorKind) S->getOpcode(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->canOverflow = S->canOverflow(); _S->isPrefix = S->isPrefix(); _S->isPostfix = S->isPostfix(); _S->isIncrementOp = S->isIncrementOp(); _S->isDecrementOp = S->isDecrementOp(); _S->isIncrementDecrementOp = S->isIncrementDecrementOp(); _S->isArithmeticOp = S->isArithmeticOp(); _S->isFPContractableWithinStatement = S->isFPContractableWithinStatement(c->getLangOpts()); _Expr = _S; break; } case clang::Stmt::OffsetOfExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::OffsetOfExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->numComponents = S->getNumComponents(); _S->numExpressions = S->getNumExpressions(); _Expr = _S; break; } case clang::Stmt::UnaryExprOrTypeTraitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::UnaryExprOrTypeTraitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->kind = (UnaryExprOrTypeTrait) S->getKind(); _S->isArgumentType = S->isArgumentType(); if (S->isArgumentType()) _S->argumentType = GetQualifiedType(S->getArgumentType()); _S->argumentExpr = static_cast(WalkExpression(S->getArgumentExpr())); _S->typeOfArgument = GetQualifiedType(S->getTypeOfArgument()); _Expr = _S; break; } case clang::Stmt::ArraySubscriptExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ArraySubscriptExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->lHS = static_cast(WalkExpression(S->getLHS())); _S->rHS = static_cast(WalkExpression(S->getRHS())); _S->base = static_cast(WalkExpression(S->getBase())); _S->idx = static_cast(WalkExpression(S->getIdx())); _Expr = _S; break; } case clang::Stmt::CallExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CallExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->callee = static_cast(WalkExpression(S->getCallee())); _S->calleeDecl = static_cast(WalkDeclaration(S->getCalleeDecl())); _S->directCallee = static_cast(WalkDeclaration(S->getDirectCallee())); _S->numArgs = S->getNumArgs(); _S->numCommas = 0; // Removed from Clang _S->builtinCallee = S->getBuiltinCallee(); _S->isCallToStdMove = S->isCallToStdMove(); for (auto _E : S->arguments()) { auto _ES = WalkExpression(_E); _S->addarguments(_ES); } _Expr = _S; break; } case clang::Stmt::MemberExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::MemberExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->base = static_cast(WalkExpression(S->getBase())); _S->arrow = S->isArrow(); _S->hadMultipleCandidates = S->hadMultipleCandidates(); _S->hasQualifier = S->hasQualifier(); _S->hasTemplateKeyword = S->hasTemplateKeyword(); _S->hasExplicitTemplateArgs = S->hasExplicitTemplateArgs(); _S->numTemplateArgs = S->getNumTemplateArgs(); _S->isImplicitAccess = S->isImplicitAccess(); _Expr = _S; break; } case clang::Stmt::CompoundLiteralExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CompoundLiteralExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->initializer = static_cast(WalkExpression(S->getInitializer())); _S->fileScope = S->isFileScope(); _Expr = _S; break; } case clang::Stmt::ImplicitCastExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ImplicitCastExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->castKind = (CastKind) S->getCastKind(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->castKindName = S->getCastKindName(); _S->subExprAsWritten = static_cast(WalkExpression(S->getSubExprAsWritten())); _S->conversionFunction = static_cast(WalkDeclaration(S->getConversionFunction())); _S->path_empty = S->path_empty(); _S->path_size = S->path_size(); _S->isPartOfExplicitCast = S->isPartOfExplicitCast(); _Expr = _S; break; } case clang::Stmt::CStyleCastExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CStyleCastExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->castKind = (CastKind) S->getCastKind(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->castKindName = S->getCastKindName(); _S->subExprAsWritten = static_cast(WalkExpression(S->getSubExprAsWritten())); _S->conversionFunction = static_cast(WalkDeclaration(S->getConversionFunction())); _S->path_empty = S->path_empty(); _S->path_size = S->path_size(); _S->typeAsWritten = GetQualifiedType(S->getTypeAsWritten()); _Expr = _S; break; } case clang::Stmt::BinaryOperatorClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::BinaryOperator(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->opcode = (BinaryOperatorKind) S->getOpcode(); _S->lHS = static_cast(WalkExpression(S->getLHS())); _S->rHS = static_cast(WalkExpression(S->getRHS())); _S->opcodeStr = S->getOpcodeStr().str(); _S->isPtrMemOp = S->isPtrMemOp(); _S->isMultiplicativeOp = S->isMultiplicativeOp(); _S->isAdditiveOp = S->isAdditiveOp(); _S->isShiftOp = S->isShiftOp(); _S->isBitwiseOp = S->isBitwiseOp(); _S->isRelationalOp = S->isRelationalOp(); _S->isEqualityOp = S->isEqualityOp(); _S->isComparisonOp = S->isComparisonOp(); _S->isLogicalOp = S->isLogicalOp(); _S->isAssignmentOp = S->isAssignmentOp(); _S->isCompoundAssignmentOp = S->isCompoundAssignmentOp(); _S->isShiftAssignOp = S->isShiftAssignOp(); _S->isFPContractableWithinStatement = S->isFPContractableWithinStatement(c->getLangOpts()); _S->isFEnvAccessOn = S->isFEnvAccessOn(c->getLangOpts()); _Expr = _S; break; } case clang::Stmt::CompoundAssignOperatorClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CompoundAssignOperator(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->opcode = (BinaryOperatorKind) S->getOpcode(); _S->lHS = static_cast(WalkExpression(S->getLHS())); _S->rHS = static_cast(WalkExpression(S->getRHS())); _S->opcodeStr = S->getOpcodeStr().str(); _S->isPtrMemOp = S->isPtrMemOp(); _S->isMultiplicativeOp = S->isMultiplicativeOp(); _S->isAdditiveOp = S->isAdditiveOp(); _S->isShiftOp = S->isShiftOp(); _S->isBitwiseOp = S->isBitwiseOp(); _S->isRelationalOp = S->isRelationalOp(); _S->isEqualityOp = S->isEqualityOp(); _S->isComparisonOp = S->isComparisonOp(); _S->isLogicalOp = S->isLogicalOp(); _S->isAssignmentOp = S->isAssignmentOp(); _S->isCompoundAssignmentOp = S->isCompoundAssignmentOp(); _S->isShiftAssignOp = S->isShiftAssignOp(); _S->isFPContractableWithinStatement = S->isFPContractableWithinStatement(c->getLangOpts()); _S->isFEnvAccessOn = S->isFEnvAccessOn(c->getLangOpts()); _S->computationLHSType = GetQualifiedType(S->getComputationLHSType()); _S->computationResultType = GetQualifiedType(S->getComputationResultType()); _Expr = _S; break; } case clang::Stmt::ConditionalOperatorClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ConditionalOperator(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->cond = static_cast(WalkExpression(S->getCond())); _S->trueExpr = static_cast(WalkExpression(S->getTrueExpr())); _S->falseExpr = static_cast(WalkExpression(S->getFalseExpr())); _S->cond = static_cast(WalkExpression(S->getCond())); _S->trueExpr = static_cast(WalkExpression(S->getTrueExpr())); _S->falseExpr = static_cast(WalkExpression(S->getFalseExpr())); _S->lHS = static_cast(WalkExpression(S->getLHS())); _S->rHS = static_cast(WalkExpression(S->getRHS())); _Expr = _S; break; } case clang::Stmt::BinaryConditionalOperatorClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::BinaryConditionalOperator(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->cond = static_cast(WalkExpression(S->getCond())); _S->trueExpr = static_cast(WalkExpression(S->getTrueExpr())); _S->falseExpr = static_cast(WalkExpression(S->getFalseExpr())); _S->common = static_cast(WalkExpression(S->getCommon())); _S->opaqueValue = static_cast(WalkExpression(S->getOpaqueValue())); _S->cond = static_cast(WalkExpression(S->getCond())); _S->trueExpr = static_cast(WalkExpression(S->getTrueExpr())); _S->falseExpr = static_cast(WalkExpression(S->getFalseExpr())); _Expr = _S; break; } case clang::Stmt::AddrLabelExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::AddrLabelExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _Expr = _S; break; } case clang::Stmt::StmtExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::StmtExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->subStmt = static_cast(WalkStatement(S->getSubStmt())); _Expr = _S; break; } case clang::Stmt::ShuffleVectorExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ShuffleVectorExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->numSubExprs = S->getNumSubExprs(); _Expr = _S; break; } case clang::Stmt::ConvertVectorExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ConvertVectorExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->srcExpr = static_cast(WalkExpression(S->getSrcExpr())); _Expr = _S; break; } case clang::Stmt::ChooseExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ChooseExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->isConditionTrue = S->isConditionTrue(); _S->cond = static_cast(WalkExpression(S->getCond())); _S->lHS = static_cast(WalkExpression(S->getLHS())); _S->rHS = static_cast(WalkExpression(S->getRHS())); _S->isConditionDependent = S->isConditionDependent(); _S->chosenSubExpr = static_cast(WalkExpression(S->getChosenSubExpr())); _Expr = _S; break; } case clang::Stmt::GNUNullExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::GNUNullExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _Expr = _S; break; } case clang::Stmt::VAArgExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::VAArgExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->isMicrosoftABI = S->isMicrosoftABI(); _Expr = _S; break; } case clang::Stmt::InitListExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::InitListExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->arrayFiller = static_cast(WalkExpression(S->getArrayFiller())); if (S->isSyntacticForm()) _S->syntacticForm = static_cast(WalkExpression(S->getSyntacticForm())); _S->numInits = S->getNumInits(); _S->hasArrayFiller = S->hasArrayFiller(); _S->isExplicit = S->isExplicit(); _S->isStringLiteralInit = S->isStringLiteralInit(); _S->isTransparent = S->isTransparent(); _S->isSemanticForm = S->isSemanticForm(); if (S->isSemanticForm()) _S->semanticForm = static_cast(WalkExpression(S->getSemanticForm())); _S->isSyntacticForm = S->isSyntacticForm(); _Expr = _S; break; } case clang::Stmt::DesignatedInitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::DesignatedInitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->init = static_cast(WalkExpression(S->getInit())); _S->size = S->size(); _S->usesGNUSyntax = S->usesGNUSyntax(); _S->numSubExprs = S->getNumSubExprs(); _Expr = _S; break; } case clang::Stmt::NoInitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::NoInitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _Expr = _S; break; } case clang::Stmt::DesignatedInitUpdateExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::DesignatedInitUpdateExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->base = static_cast(WalkExpression(S->getBase())); _S->updater = static_cast(WalkExpression(S->getUpdater())); _Expr = _S; break; } case clang::Stmt::ArrayInitLoopExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ArrayInitLoopExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->commonExpr = static_cast(WalkExpression(S->getCommonExpr())); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _Expr = _S; break; } case clang::Stmt::ArrayInitIndexExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ArrayInitIndexExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _Expr = _S; break; } case clang::Stmt::ImplicitValueInitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ImplicitValueInitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _Expr = _S; break; } case clang::Stmt::ParenListExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ParenListExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->numExprs = S->getNumExprs(); _Expr = _S; break; } case clang::Stmt::GenericSelectionExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::GenericSelectionExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->numAssocs = S->getNumAssocs(); _S->controllingExpr = static_cast(WalkExpression(S->getControllingExpr())); _S->isResultDependent = S->isResultDependent(); _S->resultIndex = S->getResultIndex(); _S->resultExpr = static_cast(WalkExpression(S->getResultExpr())); _Expr = _S; break; } case clang::Stmt::ExtVectorElementExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ExtVectorElementExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->base = static_cast(WalkExpression(S->getBase())); _S->numElements = S->getNumElements(); _S->containsDuplicateElements = S->containsDuplicateElements(); _S->isArrow = S->isArrow(); _Expr = _S; break; } case clang::Stmt::BlockExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::BlockExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->body = static_cast(WalkStatement(S->getBody())); _Expr = _S; break; } case clang::Stmt::AsTypeExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::AsTypeExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->srcExpr = static_cast(WalkExpression(S->getSrcExpr())); _Expr = _S; break; } case clang::Stmt::PseudoObjectExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::PseudoObjectExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->syntacticForm = static_cast(WalkExpression(S->getSyntacticForm())); _S->resultExprIndex = S->getResultExprIndex(); _S->resultExpr = static_cast(WalkExpression(S->getResultExpr())); _S->numSemanticExprs = S->getNumSemanticExprs(); _Expr = _S; break; } case clang::Stmt::AtomicExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::AtomicExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->ptr = static_cast(WalkExpression(S->getPtr())); _S->order = static_cast(WalkExpression(S->getOrder())); _S->scope = static_cast(WalkExpression(S->getScope())); _S->val1 = static_cast(WalkExpression(S->getVal1())); _S->orderFail = static_cast(WalkExpression(S->getOrderFail())); _S->val2 = static_cast(WalkExpression(S->getVal2())); _S->weak = static_cast(WalkExpression(S->getWeak())); _S->valueType = GetQualifiedType(S->getValueType()); _S->op = (AtomicExpr::AtomicOp) S->getOp(); _S->numSubExprs = S->getNumSubExprs(); _S->isVolatile = S->isVolatile(); _S->isCmpXChg = S->isCmpXChg(); _S->isOpenCL = S->isOpenCL(); _Expr = _S; break; } case clang::Stmt::TypoExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::TypoExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _Expr = _S; break; } case clang::Stmt::CXXOperatorCallExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXOperatorCallExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->callee = static_cast(WalkExpression(S->getCallee())); _S->calleeDecl = static_cast(WalkDeclaration(S->getCalleeDecl())); _S->directCallee = static_cast(WalkDeclaration(S->getDirectCallee())); _S->numArgs = S->getNumArgs(); _S->numCommas = 0; // Removed from Clang _S->builtinCallee = S->getBuiltinCallee(); _S->isCallToStdMove = S->isCallToStdMove(); for (auto _E : S->arguments()) { auto _ES = WalkExpression(_E); _S->addarguments(_ES); } _S->_operator = (OverloadedOperatorKind) S->getOperator(); _S->isAssignmentOp = S->isAssignmentOp(); _S->isInfixBinaryOp = S->isInfixBinaryOp(); _Expr = _S; break; } case clang::Stmt::CXXMemberCallExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXMemberCallExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->callee = static_cast(WalkExpression(S->getCallee())); _S->calleeDecl = static_cast(WalkDeclaration(S->getCalleeDecl())); _S->directCallee = static_cast(WalkDeclaration(S->getDirectCallee())); _S->numArgs = S->getNumArgs(); _S->numCommas = 0; // Removed from Clang _S->builtinCallee = S->getBuiltinCallee(); _S->isCallToStdMove = S->isCallToStdMove(); for (auto _E : S->arguments()) { auto _ES = WalkExpression(_E); _S->addarguments(_ES); } _S->implicitObjectArgument = static_cast(WalkExpression(S->getImplicitObjectArgument())); _S->methodDecl = static_cast(WalkDeclaration(S->getMethodDecl())); _Expr = _S; break; } case clang::Stmt::CUDAKernelCallExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CUDAKernelCallExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->callee = static_cast(WalkExpression(S->getCallee())); _S->calleeDecl = static_cast(WalkDeclaration(S->getCalleeDecl())); _S->directCallee = static_cast(WalkDeclaration(S->getDirectCallee())); _S->numArgs = S->getNumArgs(); _S->numCommas = 0; // Removed from Clang _S->builtinCallee = S->getBuiltinCallee(); _S->isCallToStdMove = S->isCallToStdMove(); for (auto _E : S->arguments()) { auto _ES = WalkExpression(_E); _S->addarguments(_ES); } _S->config = static_cast(WalkExpression(S->getConfig())); _Expr = _S; break; } case clang::Stmt::CXXStaticCastExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXStaticCastExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->castKind = (CastKind) S->getCastKind(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->castKindName = S->getCastKindName(); _S->subExprAsWritten = static_cast(WalkExpression(S->getSubExprAsWritten())); _S->conversionFunction = static_cast(WalkDeclaration(S->getConversionFunction())); _S->path_empty = S->path_empty(); _S->path_size = S->path_size(); _S->typeAsWritten = GetQualifiedType(S->getTypeAsWritten()); _S->castName = S->getCastName(); _Expr = _S; break; } case clang::Stmt::CXXDynamicCastExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXDynamicCastExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->castKind = (CastKind) S->getCastKind(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->castKindName = S->getCastKindName(); _S->subExprAsWritten = static_cast(WalkExpression(S->getSubExprAsWritten())); _S->conversionFunction = static_cast(WalkDeclaration(S->getConversionFunction())); _S->path_empty = S->path_empty(); _S->path_size = S->path_size(); _S->typeAsWritten = GetQualifiedType(S->getTypeAsWritten()); _S->castName = S->getCastName(); _S->isAlwaysNull = S->isAlwaysNull(); _Expr = _S; break; } case clang::Stmt::CXXReinterpretCastExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXReinterpretCastExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->castKind = (CastKind) S->getCastKind(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->castKindName = S->getCastKindName(); _S->subExprAsWritten = static_cast(WalkExpression(S->getSubExprAsWritten())); _S->conversionFunction = static_cast(WalkDeclaration(S->getConversionFunction())); _S->path_empty = S->path_empty(); _S->path_size = S->path_size(); _S->typeAsWritten = GetQualifiedType(S->getTypeAsWritten()); _S->castName = S->getCastName(); _Expr = _S; break; } case clang::Stmt::CXXConstCastExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXConstCastExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->castKind = (CastKind) S->getCastKind(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->castKindName = S->getCastKindName(); _S->subExprAsWritten = static_cast(WalkExpression(S->getSubExprAsWritten())); _S->conversionFunction = static_cast(WalkDeclaration(S->getConversionFunction())); _S->path_empty = S->path_empty(); _S->path_size = S->path_size(); _S->typeAsWritten = GetQualifiedType(S->getTypeAsWritten()); _S->castName = S->getCastName(); _Expr = _S; break; } case clang::Stmt::UserDefinedLiteralClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::UserDefinedLiteral(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->callee = static_cast(WalkExpression(S->getCallee())); _S->calleeDecl = static_cast(WalkDeclaration(S->getCalleeDecl())); _S->directCallee = static_cast(WalkDeclaration(S->getDirectCallee())); _S->numArgs = S->getNumArgs(); _S->numCommas = 0; // Removed from Clang _S->builtinCallee = S->getBuiltinCallee(); _S->isCallToStdMove = S->isCallToStdMove(); for (auto _E : S->arguments()) { auto _ES = WalkExpression(_E); _S->addarguments(_ES); } _S->literalOperatorKind = (UserDefinedLiteral::LiteralOperatorKind) S->getLiteralOperatorKind(); _S->cookedLiteral = static_cast(WalkExpression(S->getCookedLiteral())); _Expr = _S; break; } case clang::Stmt::CXXBoolLiteralExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXBoolLiteralExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->value = S->getValue(); _Expr = _S; break; } case clang::Stmt::CXXNullPtrLiteralExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXNullPtrLiteralExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _Expr = _S; break; } case clang::Stmt::CXXStdInitializerListExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXStdInitializerListExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _Expr = _S; break; } case clang::Stmt::CXXTypeidExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXTypeidExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->exprOperand = static_cast(WalkExpression(S->getExprOperand())); _S->isPotentiallyEvaluated = S->isPotentiallyEvaluated(); _S->isTypeOperand = S->isTypeOperand(); _Expr = _S; break; } case clang::Stmt::MSPropertyRefExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::MSPropertyRefExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->isImplicitAccess = S->isImplicitAccess(); _S->baseExpr = static_cast(WalkExpression(S->getBaseExpr())); _S->isArrow = S->isArrow(); _Expr = _S; break; } case clang::Stmt::MSPropertySubscriptExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::MSPropertySubscriptExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->base = static_cast(WalkExpression(S->getBase())); _S->idx = static_cast(WalkExpression(S->getIdx())); _Expr = _S; break; } case clang::Stmt::CXXUuidofExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXUuidofExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->exprOperand = static_cast(WalkExpression(S->getExprOperand())); _S->uuidStr = S->getGuidDecl()->getNameAsString(); _S->isTypeOperand = S->isTypeOperand(); _Expr = _S; break; } case clang::Stmt::CXXThisExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXThisExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->implicit = S->isImplicit(); _Expr = _S; break; } case clang::Stmt::CXXThrowExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXThrowExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->isThrownVariableInScope = S->isThrownVariableInScope(); _Expr = _S; break; } case clang::Stmt::CXXDefaultArgExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXDefaultArgExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->expr = static_cast(WalkExpression(S->getExpr())); _Expr = _S; break; } case clang::Stmt::CXXDefaultInitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXDefaultInitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->field = static_cast(WalkDeclaration(S->getField())); _S->expr = static_cast(WalkExpression(S->getExpr())); _Expr = _S; break; } case clang::Stmt::CXXBindTemporaryExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXBindTemporaryExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _Expr = _S; break; } case clang::Stmt::CXXConstructExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXConstructExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->elidable = S->isElidable(); _S->hadMultipleCandidates = S->hadMultipleCandidates(); _S->listInitialization = S->isListInitialization(); _S->stdInitListInitialization = S->isStdInitListInitialization(); _S->requiresZeroInitialization = S->requiresZeroInitialization(); _S->numArgs = S->getNumArgs(); for (auto _E : S->arguments()) { auto _ES = WalkExpression(_E); _S->addarguments(_ES); } _Expr = _S; break; } case clang::Stmt::CXXInheritedCtorInitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXInheritedCtorInitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->constructsVBase = S->constructsVBase(); _S->inheritedFromVBase = S->inheritedFromVBase(); _Expr = _S; break; } case clang::Stmt::CXXFunctionalCastExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXFunctionalCastExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->castKind = (CastKind) S->getCastKind(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->castKindName = S->getCastKindName(); _S->subExprAsWritten = static_cast(WalkExpression(S->getSubExprAsWritten())); _S->conversionFunction = static_cast(WalkDeclaration(S->getConversionFunction())); _S->path_empty = S->path_empty(); _S->path_size = S->path_size(); _S->typeAsWritten = GetQualifiedType(S->getTypeAsWritten()); _S->isListInitialization = S->isListInitialization(); _Expr = _S; break; } case clang::Stmt::CXXTemporaryObjectExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXTemporaryObjectExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->elidable = S->isElidable(); _S->hadMultipleCandidates = S->hadMultipleCandidates(); _S->listInitialization = S->isListInitialization(); _S->stdInitListInitialization = S->isStdInitListInitialization(); _S->requiresZeroInitialization = S->requiresZeroInitialization(); _S->numArgs = S->getNumArgs(); for (auto _E : S->arguments()) { auto _ES = WalkExpression(_E); _S->addarguments(_ES); } _Expr = _S; break; } case clang::Stmt::LambdaExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::LambdaExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->capture_size = S->capture_size(); _S->callOperator = static_cast(WalkDeclaration(S->getCallOperator())); _S->isGenericLambda = S->isGenericLambda(); _S->body = static_cast(WalkStatement(S->getBody())); _S->isMutable = S->isMutable(); _S->hasExplicitParameters = S->hasExplicitParameters(); _S->hasExplicitResultType = S->hasExplicitResultType(); for (auto _E : S->capture_inits()) { auto _ES = WalkExpression(_E); _S->addcapture_inits(_ES); } _Expr = _S; break; } case clang::Stmt::CXXScalarValueInitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXScalarValueInitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _Expr = _S; break; } case clang::Stmt::CXXNewExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXNewExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->operatorNew = static_cast(WalkDeclaration(S->getOperatorNew())); _S->operatorDelete = static_cast(WalkDeclaration(S->getOperatorDelete())); _S->allocatedType = GetQualifiedType(S->getAllocatedType()); _S->isArray = S->isArray(); _S->arraySize = static_cast(WalkExpression(S->getArraySize().value())); _S->numPlacementArgs = S->getNumPlacementArgs(); _S->isParenTypeId = S->isParenTypeId(); _S->isGlobalNew = S->isGlobalNew(); _S->hasInitializer = S->hasInitializer(); _S->initializationStyle = (CXXNewExpr::InitializationStyle) S->getInitializationStyle(); _S->initializer = static_cast(WalkExpression(S->getInitializer())); _S->constructExpr = static_cast(WalkExpression(S->getConstructExpr())); for (auto _E : S->placement_arguments()) { auto _ES = WalkExpression(_E); _S->addplacement_arguments(_ES); } _Expr = _S; break; } case clang::Stmt::CXXDeleteExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXDeleteExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->isGlobalDelete = S->isGlobalDelete(); _S->isArrayForm = S->isArrayForm(); _S->isArrayFormAsWritten = S->isArrayFormAsWritten(); _S->operatorDelete = static_cast(WalkDeclaration(S->getOperatorDelete())); _S->argument = static_cast(WalkExpression(S->getArgument())); _S->destroyedType = GetQualifiedType(S->getDestroyedType()); _Expr = _S; break; } case clang::Stmt::CXXPseudoDestructorExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXPseudoDestructorExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->base = static_cast(WalkExpression(S->getBase())); _S->hasQualifier = S->hasQualifier(); _S->isArrow = S->isArrow(); _S->destroyedType = GetQualifiedType(S->getDestroyedType()); _Expr = _S; break; } case clang::Stmt::TypeTraitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::TypeTraitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->value = S->getValue(); _S->numArgs = S->getNumArgs(); _Expr = _S; break; } case clang::Stmt::ArrayTypeTraitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ArrayTypeTraitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->queriedType = GetQualifiedType(S->getQueriedType()); _S->value = S->getValue(); _S->dimensionExpression = static_cast(WalkExpression(S->getDimensionExpression())); _Expr = _S; break; } case clang::Stmt::ExpressionTraitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ExpressionTraitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->queriedExpression = static_cast(WalkExpression(S->getQueriedExpression())); _S->value = S->getValue(); _Expr = _S; break; } case clang::Stmt::UnresolvedLookupExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::UnresolvedLookupExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->numDecls = S->getNumDecls(); _S->hasTemplateKeyword = S->hasTemplateKeyword(); _S->hasExplicitTemplateArgs = S->hasExplicitTemplateArgs(); _S->numTemplateArgs = S->getNumTemplateArgs(); _S->requiresADL = S->requiresADL(); _S->isOverloaded = S->isOverloaded(); _Expr = _S; break; } case clang::Stmt::DependentScopeDeclRefExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::DependentScopeDeclRefExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->hasTemplateKeyword = S->hasTemplateKeyword(); _S->hasExplicitTemplateArgs = S->hasExplicitTemplateArgs(); _S->numTemplateArgs = S->getNumTemplateArgs(); _Expr = _S; break; } case clang::Stmt::ExprWithCleanupsClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::ExprWithCleanups(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->subExpr = static_cast(WalkExpression(S->getSubExpr())); _S->numObjects = S->getNumObjects(); _S->cleanupsHaveSideEffects = S->cleanupsHaveSideEffects(); _Expr = _S; break; } case clang::Stmt::CXXUnresolvedConstructExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXUnresolvedConstructExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->typeAsWritten = GetQualifiedType(S->getTypeAsWritten()); _S->isListInitialization = S->isListInitialization(); _S->arg_size = S->getNumArgs(); for (auto _E : S->arguments()) { auto _ES = WalkExpression(_E); _S->addarguments(_ES); } _Expr = _S; break; } case clang::Stmt::CXXDependentScopeMemberExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXDependentScopeMemberExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->isImplicitAccess = S->isImplicitAccess(); _S->base = static_cast(WalkExpression(S->getBase())); _S->baseType = GetQualifiedType(S->getBaseType()); _S->isArrow = S->isArrow(); _S->firstQualifierFoundInScope = static_cast(WalkDeclaration(S->getFirstQualifierFoundInScope())); _S->hasTemplateKeyword = S->hasTemplateKeyword(); _S->hasExplicitTemplateArgs = S->hasExplicitTemplateArgs(); _S->numTemplateArgs = S->getNumTemplateArgs(); _Expr = _S; break; } case clang::Stmt::UnresolvedMemberExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::UnresolvedMemberExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->numDecls = S->getNumDecls(); _S->hasTemplateKeyword = S->hasTemplateKeyword(); _S->hasExplicitTemplateArgs = S->hasExplicitTemplateArgs(); _S->numTemplateArgs = S->getNumTemplateArgs(); _S->isImplicitAccess = S->isImplicitAccess(); _S->base = static_cast(WalkExpression(S->getBase())); _S->baseType = GetQualifiedType(S->getBaseType()); _S->hasUnresolvedUsing = S->hasUnresolvedUsing(); _S->isArrow = S->isArrow(); _Expr = _S; break; } case clang::Stmt::CXXNoexceptExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXNoexceptExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->operand = static_cast(WalkExpression(S->getOperand())); _S->value = S->getValue(); _Expr = _S; break; } case clang::Stmt::PackExpansionExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::PackExpansionExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->pattern = static_cast(WalkExpression(S->getPattern())); _Expr = _S; break; } case clang::Stmt::SizeOfPackExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::SizeOfPackExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->pack = static_cast(WalkDeclaration(S->getPack())); _S->packLength = S->getPackLength(); _S->isPartiallySubstituted = S->isPartiallySubstituted(); _Expr = _S; break; } case clang::Stmt::SubstNonTypeTemplateParmExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::SubstNonTypeTemplateParmExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->replacement = static_cast(WalkExpression(S->getReplacement())); _Expr = _S; break; } case clang::Stmt::SubstNonTypeTemplateParmPackExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::SubstNonTypeTemplateParmPackExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->argumentPack = WalkTemplateArgument(S->getArgumentPack()); _Expr = _S; break; } case clang::Stmt::FunctionParmPackExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::FunctionParmPackExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->numExpansions = S->getNumExpansions(); _Expr = _S; break; } case clang::Stmt::MaterializeTemporaryExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::MaterializeTemporaryExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->temporary = static_cast(WalkStatement(S->getSubExpr())); _S->TemporaryExpr = static_cast(WalkExpression(S->getSubExpr())); _S->manglingNumber = S->getManglingNumber(); _S->isBoundToLvalueReference = S->isBoundToLvalueReference(); _Expr = _S; break; } case clang::Stmt::CXXFoldExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CXXFoldExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->lHS = static_cast(WalkExpression(S->getLHS())); _S->rHS = static_cast(WalkExpression(S->getRHS())); _S->isRightFold = S->isRightFold(); _S->isLeftFold = S->isLeftFold(); _S->pattern = static_cast(WalkExpression(S->getPattern())); _S->init = static_cast(WalkExpression(S->getInit())); _S->_operator = (BinaryOperatorKind) S->getOperator(); _Expr = _S; break; } case clang::Stmt::CoawaitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CoawaitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->commonExpr = static_cast(WalkExpression(S->getCommonExpr())); _S->opaqueValue = static_cast(WalkExpression(S->getOpaqueValue())); _S->readyExpr = static_cast(WalkExpression(S->getReadyExpr())); _S->suspendExpr = static_cast(WalkExpression(S->getSuspendExpr())); _S->resumeExpr = static_cast(WalkExpression(S->getResumeExpr())); _S->isImplicit = S->isImplicit(); _S->operand = static_cast(WalkExpression(S->getOperand())); _Expr = _S; break; } case clang::Stmt::DependentCoawaitExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::DependentCoawaitExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->operand = static_cast(WalkExpression(S->getOperand())); _S->operatorCoawaitLookup = static_cast(WalkExpression(S->getOperatorCoawaitLookup())); _Expr = _S; break; } case clang::Stmt::CoyieldExprClass: { auto S = const_cast(llvm::cast(Expr)); auto _S = new AST::CoyieldExpr(); _S->type = GetQualifiedType(S->getType()); _S->valueDependent = S->isValueDependent(); _S->typeDependent = S->isTypeDependent(); _S->instantiationDependent = S->isInstantiationDependent(); _S->containsUnexpandedParameterPack = S->containsUnexpandedParameterPack(); _S->isLValue = S->isLValue(); _S->isRValue = S->isPRValue(); _S->isXValue = S->isXValue(); _S->isGLValue = S->isGLValue(); _S->isOrdinaryOrBitFieldObject = S->isOrdinaryOrBitFieldObject(); _S->sourceBitField = static_cast(WalkDeclaration(S->getSourceBitField())); _S->referencedDeclOfCallee = static_cast(WalkDeclaration(S->getReferencedDeclOfCallee())); _S->hasPlaceholderType = S->hasPlaceholderType(); _S->commonExpr = static_cast(WalkExpression(S->getCommonExpr())); _S->opaqueValue = static_cast(WalkExpression(S->getOpaqueValue())); _S->readyExpr = static_cast(WalkExpression(S->getReadyExpr())); _S->suspendExpr = static_cast(WalkExpression(S->getSuspendExpr())); _S->resumeExpr = static_cast(WalkExpression(S->getResumeExpr())); _S->operand = static_cast(WalkExpression(S->getOperand())); _Expr = _S; break; } default: printf("Unhandled statement kind: %s\n", Expr->getStmtClassName()); } return _Expr; } }