clang  6.0.0svn
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
clang::TreeTransform< Derived > Class Template Reference

A semantic tree transformation that allows one to transform one abstract syntax tree into another. More...

#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/Sema/TreeTransform.h"

Collaboration diagram for clang::TreeTransform< Derived >:
Collaboration graph
[legend]

Classes

class  TemporaryBase
 RAII object that temporarily sets the base location and entity used for reporting diagnostics in types. More...
 

Public Member Functions

 TreeTransform (Sema &SemaRef)
 Initializes a new tree transformer. More...
 
Derived & getDerived ()
 Retrieves a reference to the derived class. More...
 
const Derived & getDerived () const
 Retrieves a reference to the derived class. More...
 
SemagetSema () const
 Retrieves a reference to the semantic analysis object used for this tree transform. More...
 
bool AlwaysRebuild ()
 Whether the transformation should always rebuild AST nodes, even if none of the children have changed. More...
 
SourceLocation getBaseLocation ()
 Returns the location of the entity being transformed, if that information was not available elsewhere in the AST. More...
 
DeclarationName getBaseEntity ()
 Returns the name of the entity being transformed, if that information was not available elsewhere in the AST. More...
 
void setBase (SourceLocation Loc, DeclarationName Entity)
 Sets the "base" location and entity when that information is known based on another transformation. More...
 
bool AlreadyTransformed (QualType T)
 Determine whether the given type T has already been transformed. More...
 
bool DropCallArgument (Expr *E)
 Determine whether the given call argument should be dropped, e.g., because it is a default argument. More...
 
bool TryExpandParameterPacks (SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef< UnexpandedParameterPack > Unexpanded, bool &ShouldExpand, bool &RetainExpansion, Optional< unsigned > &NumExpansions)
 Determine whether we should expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern. More...
 
TemplateArgument ForgetPartiallySubstitutedPack ()
 "Forget" about the partially-substituted pack template argument, when performing an instantiation that must preserve the parameter pack use. More...
 
void RememberPartiallySubstitutedPack (TemplateArgument Arg)
 "Remember" the partially-substituted pack template argument after performing an instantiation that must preserve the parameter pack use. More...
 
void ExpandingFunctionParameterPack (ParmVarDecl *Pack)
 Note to the derived class when a function parameter pack is being expanded. More...
 
QualType TransformType (QualType T)
 Transforms the given type into another type. More...
 
TypeSourceInfoTransformType (TypeSourceInfo *DI)
 Transforms the given type-with-location into a new type-with-location. More...
 
QualType TransformType (TypeLocBuilder &TLB, TypeLoc TL)
 Transform the given type-with-location into a new type, collecting location information in the given builder as necessary. More...
 
StmtResult TransformStmt (Stmt *S)
 Transform the given statement. More...
 
OMPClauseTransformOMPClause (OMPClause *S)
 Transform the given statement. More...
 
const AttrTransformAttr (const Attr *S)
 Transform the given attribute. More...
 
ExprResult TransformExpr (Expr *E)
 Transform the given expression. More...
 
ExprResult TransformInitializer (Expr *Init, bool NotCopyInit)
 Transform the given initializer. More...
 
bool TransformExprs (Expr *const *Inputs, unsigned NumInputs, bool IsCall, SmallVectorImpl< Expr *> &Outputs, bool *ArgChanged=nullptr)
 Transform the given list of expressions. More...
 
DeclTransformDecl (SourceLocation Loc, Decl *D)
 Transform the given declaration, which is referenced from a type or expression. More...
 
Sema::ConditionResult TransformCondition (SourceLocation Loc, VarDecl *Var, Expr *Expr, Sema::ConditionKind Kind)
 Transform the specified condition. More...
 
void transformAttrs (Decl *Old, Decl *New)
 Transform the attributes associated with the given declaration and place them on the new declaration. More...
 
void transformedLocalDecl (Decl *Old, Decl *New)
 Note that a local declaration has been transformed by this transformer. More...
 
DeclTransformDefinition (SourceLocation Loc, Decl *D)
 Transform the definition of the given declaration. More...
 
NamedDeclTransformFirstQualifierInScope (NamedDecl *D, SourceLocation Loc)
 Transform the given declaration, which was the first part of a nested-name-specifier in a member access expression. More...
 
bool TransformOverloadExprDecls (OverloadExpr *Old, bool RequiresADL, LookupResult &R)
 Transform the set of declarations in an OverloadExpr. More...
 
NestedNameSpecifierLoc TransformNestedNameSpecifierLoc (NestedNameSpecifierLoc NNS, QualType ObjectType=QualType(), NamedDecl *FirstQualifierInScope=nullptr)
 Transform the given nested-name-specifier with source-location information. More...
 
DeclarationNameInfo TransformDeclarationNameInfo (const DeclarationNameInfo &NameInfo)
 Transform the given declaration name. More...
 
TemplateName TransformTemplateName (CXXScopeSpec &SS, TemplateName Name, SourceLocation NameLoc, QualType ObjectType=QualType(), NamedDecl *FirstQualifierInScope=nullptr, bool AllowInjectedClassName=false)
 Transform the given template name. More...
 
bool TransformTemplateArgument (const TemplateArgumentLoc &Input, TemplateArgumentLoc &Output, bool Uneval=false)
 Transform the given template argument. More...
 
bool TransformTemplateArguments (const TemplateArgumentLoc *Inputs, unsigned NumInputs, TemplateArgumentListInfo &Outputs, bool Uneval=false)
 Transform the given set of template arguments. More...
 
template<typename InputIterator >
bool TransformTemplateArguments (InputIterator First, InputIterator Last, TemplateArgumentListInfo &Outputs, bool Uneval=false)
 Transform the given set of template arguments. More...
 
void InventTemplateArgumentLoc (const TemplateArgument &Arg, TemplateArgumentLoc &ArgLoc)
 Fakes up a TemplateArgumentLoc for a given TemplateArgument. More...
 
TypeSourceInfoInventTypeSourceInfo (QualType T)
 Fakes up a TypeSourceInfo for a type. More...
 
template<typename Fn >
QualType TransformFunctionProtoType (TypeLocBuilder &TLB, FunctionProtoTypeLoc TL, CXXRecordDecl *ThisContext, unsigned ThisTypeQuals, Fn TransformExceptionSpec)
 
bool TransformExceptionSpec (SourceLocation Loc, FunctionProtoType::ExceptionSpecInfo &ESI, SmallVectorImpl< QualType > &Exceptions, bool &Changed)
 
StmtResult TransformSEHHandler (Stmt *Handler)
 
QualType TransformTemplateSpecializationType (TypeLocBuilder &TLB, TemplateSpecializationTypeLoc TL, TemplateName Template)
 
QualType TransformDependentTemplateSpecializationType (TypeLocBuilder &TLB, DependentTemplateSpecializationTypeLoc TL, TemplateName Template, CXXScopeSpec &SS)
 
QualType TransformDependentTemplateSpecializationType (TypeLocBuilder &TLB, DependentTemplateSpecializationTypeLoc TL, NestedNameSpecifierLoc QualifierLoc)
 
bool TransformFunctionTypeParams (SourceLocation Loc, ArrayRef< ParmVarDecl *> Params, const QualType *ParamTypes, const FunctionProtoType::ExtParameterInfo *ParamInfos, SmallVectorImpl< QualType > &PTypes, SmallVectorImpl< ParmVarDecl *> *PVars, Sema::ExtParameterInfoBuilder &PInfos)
 Transforms the parameters of a function type into the given vectors. More...
 
ParmVarDeclTransformFunctionTypeParam (ParmVarDecl *OldParm, int indexAdjustment, Optional< unsigned > NumExpansions, bool ExpectParameterPack)
 Transforms a single function-type parameter. More...
 
QualType TransformReferenceType (TypeLocBuilder &TLB, ReferenceTypeLoc TL)
 Transforms a reference type. More...
 
StmtResult TransformCompoundStmt (CompoundStmt *S, bool IsStmtExpr)
 
ExprResult TransformCXXNamedCastExpr (CXXNamedCastExpr *E)
 
TemplateParameterListTransformTemplateParameterList (TemplateParameterList *TPL)
 
ExprResult TransformAddressOfOperand (Expr *E)
 The operand of a unary address-of operator has special rules: it's allowed to refer to a non-static member of a class even if there's no 'this' object available. More...
 
ExprResult TransformDependentScopeDeclRefExpr (DependentScopeDeclRefExpr *E, bool IsAddressOfOperand, TypeSourceInfo **RecoveryTSI)
 
ExprResult TransformParenDependentScopeDeclRefExpr (ParenExpr *PE, DependentScopeDeclRefExpr *DRE, bool IsAddressOfOperand, TypeSourceInfo **RecoveryTSI)
 
StmtResult TransformOMPExecutableDirective (OMPExecutableDirective *S)
 
QualType RebuildQualifiedType (QualType T, SourceLocation Loc, Qualifiers Quals)
 Build a new qualified type given its unqualified type and type qualifiers. More...
 
QualType RebuildPointerType (QualType PointeeType, SourceLocation Sigil)
 Build a new pointer type given its pointee type. More...
 
QualType RebuildBlockPointerType (QualType PointeeType, SourceLocation Sigil)
 Build a new block pointer type given its pointee type. More...
 
QualType RebuildReferenceType (QualType ReferentType, bool LValue, SourceLocation Sigil)
 Build a new reference type given the type it references. More...
 
QualType RebuildMemberPointerType (QualType PointeeType, QualType ClassType, SourceLocation Sigil)
 Build a new member pointer type given the pointee type and the class type it refers into. More...
 
QualType RebuildObjCTypeParamType (const ObjCTypeParamDecl *Decl, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl *> Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc)
 
QualType RebuildObjCObjectType (QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc, ArrayRef< TypeSourceInfo *> TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl *> Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc)
 Build an Objective-C object type. More...
 
QualType RebuildObjCObjectPointerType (QualType PointeeType, SourceLocation Star)
 Build a new Objective-C object pointer type given the pointee type. More...
 
QualType RebuildArrayType (QualType ElementType, ArrayType::ArraySizeModifier SizeMod, const llvm::APInt *Size, Expr *SizeExpr, unsigned IndexTypeQuals, SourceRange BracketsRange)
 Build a new array type given the element type, size modifier, size of the array (if known), size expression, and index type qualifiers. More...
 
QualType RebuildConstantArrayType (QualType ElementType, ArrayType::ArraySizeModifier SizeMod, const llvm::APInt &Size, unsigned IndexTypeQuals, SourceRange BracketsRange)
 Build a new constant array type given the element type, size modifier, (known) size of the array, and index type qualifiers. More...
 
QualType RebuildIncompleteArrayType (QualType ElementType, ArrayType::ArraySizeModifier SizeMod, unsigned IndexTypeQuals, SourceRange BracketsRange)
 Build a new incomplete array type given the element type, size modifier, and index type qualifiers. More...
 
QualType RebuildVariableArrayType (QualType ElementType, ArrayType::ArraySizeModifier SizeMod, Expr *SizeExpr, unsigned IndexTypeQuals, SourceRange BracketsRange)
 Build a new variable-length array type given the element type, size modifier, size expression, and index type qualifiers. More...
 
QualType RebuildDependentSizedArrayType (QualType ElementType, ArrayType::ArraySizeModifier SizeMod, Expr *SizeExpr, unsigned IndexTypeQuals, SourceRange BracketsRange)
 Build a new dependent-sized array type given the element type, size modifier, size expression, and index type qualifiers. More...
 
QualType RebuildVectorType (QualType ElementType, unsigned NumElements, VectorType::VectorKind VecKind)
 Build a new vector type given the element type and number of elements. More...
 
QualType RebuildExtVectorType (QualType ElementType, unsigned NumElements, SourceLocation AttributeLoc)
 Build a new extended vector type given the element type and number of elements. More...
 
QualType RebuildDependentSizedExtVectorType (QualType ElementType, Expr *SizeExpr, SourceLocation AttributeLoc)
 Build a new potentially dependently-sized extended vector type given the element type and number of elements. More...
 
QualType RebuildDependentAddressSpaceType (QualType PointeeType, Expr *AddrSpaceExpr, SourceLocation AttributeLoc)
 Build a new DependentAddressSpaceType or return the pointee type variable with the correct address space (retrieved from AddrSpaceExpr) applied to it. More...
 
QualType RebuildFunctionProtoType (QualType T, MutableArrayRef< QualType > ParamTypes, const FunctionProtoType::ExtProtoInfo &EPI)
 Build a new function type. More...
 
QualType RebuildFunctionNoProtoType (QualType ResultType)
 Build a new unprototyped function type. More...
 
QualType RebuildUnresolvedUsingType (SourceLocation NameLoc, Decl *D)
 Rebuild an unresolved typename type, given the decl that the UnresolvedUsingTypenameDecl was transformed to. More...
 
QualType RebuildTypedefType (TypedefNameDecl *Typedef)
 Build a new typedef type. More...
 
QualType RebuildRecordType (RecordDecl *Record)
 Build a new class/struct/union type. More...
 
QualType RebuildEnumType (EnumDecl *Enum)
 Build a new Enum type. More...
 
QualType RebuildTypeOfExprType (Expr *Underlying, SourceLocation Loc)
 Build a new typeof(expr) type. More...
 
QualType RebuildTypeOfType (QualType Underlying)
 Build a new typeof(type) type. More...
 
QualType RebuildUnaryTransformType (QualType BaseType, UnaryTransformType::UTTKind UKind, SourceLocation Loc)
 Build a new unary transform type. More...
 
QualType RebuildDecltypeType (Expr *Underlying, SourceLocation Loc)
 Build a new C++11 decltype type. More...
 
QualType RebuildAutoType (QualType Deduced, AutoTypeKeyword Keyword)
 Build a new C++11 auto type. More...
 
QualType RebuildDeducedTemplateSpecializationType (TemplateName Template, QualType Deduced)
 By default, builds a new DeducedTemplateSpecializationType with the given deduced type. More...
 
QualType RebuildTemplateSpecializationType (TemplateName Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &Args)
 Build a new template specialization type. More...
 
QualType RebuildParenType (QualType InnerType)
 Build a new parenthesized type. More...
 
QualType RebuildElaboratedType (SourceLocation KeywordLoc, ElaboratedTypeKeyword Keyword, NestedNameSpecifierLoc QualifierLoc, QualType Named)
 Build a new qualified name type. More...
 
QualType RebuildDependentTemplateSpecializationType (ElaboratedTypeKeyword Keyword, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo *Name, SourceLocation NameLoc, TemplateArgumentListInfo &Args, bool AllowInjectedClassName)
 Build a new typename type that refers to a template-id. More...
 
QualType RebuildDependentNameType (ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo *Id, SourceLocation IdLoc, bool DeducedTSTContext)
 Build a new typename type that refers to an identifier. More...
 
QualType RebuildPackExpansionType (QualType Pattern, SourceRange PatternRange, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
 Build a new pack expansion type. More...
 
QualType RebuildAtomicType (QualType ValueType, SourceLocation KWLoc)
 Build a new atomic type given its value type. More...
 
QualType RebuildPipeType (QualType ValueType, SourceLocation KWLoc, bool isReadPipe)
 Build a new pipe type given its value type. More...
 
TemplateName RebuildTemplateName (CXXScopeSpec &SS, bool TemplateKW, TemplateDecl *Template)
 Build a new template name given a nested name specifier, a flag indicating whether the "template" keyword was provided, and the template that the template name refers to. More...
 
TemplateName RebuildTemplateName (CXXScopeSpec &SS, const IdentifierInfo &Name, SourceLocation NameLoc, QualType ObjectType, NamedDecl *FirstQualifierInScope, bool AllowInjectedClassName)
 Build a new template name given a nested name specifier and the name that is referred to as a template. More...
 
TemplateName RebuildTemplateName (CXXScopeSpec &SS, OverloadedOperatorKind Operator, SourceLocation NameLoc, QualType ObjectType, bool AllowInjectedClassName)
 Build a new template name given a nested name specifier and the overloaded operator name that is referred to as a template. More...
 
TemplateName RebuildTemplateName (TemplateTemplateParmDecl *Param, const TemplateArgument &ArgPack)
 Build a new template name given a template template parameter pack and the. More...
 
StmtResult RebuildCompoundStmt (SourceLocation LBraceLoc, MultiStmtArg Statements, SourceLocation RBraceLoc, bool IsStmtExpr)
 Build a new compound statement. More...
 
StmtResult RebuildCaseStmt (SourceLocation CaseLoc, Expr *LHS, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation ColonLoc)
 Build a new case statement. More...
 
StmtResult RebuildCaseStmtBody (Stmt *S, Stmt *Body)
 Attach the body to a new case statement. More...
 
StmtResult RebuildDefaultStmt (SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt)
 Build a new default statement. More...
 
StmtResult RebuildLabelStmt (SourceLocation IdentLoc, LabelDecl *L, SourceLocation ColonLoc, Stmt *SubStmt)
 Build a new label statement. More...
 
StmtResult RebuildAttributedStmt (SourceLocation AttrLoc, ArrayRef< const Attr *> Attrs, Stmt *SubStmt)
 Build a new label statement. More...
 
StmtResult RebuildIfStmt (SourceLocation IfLoc, bool IsConstexpr, Sema::ConditionResult Cond, Stmt *Init, Stmt *Then, SourceLocation ElseLoc, Stmt *Else)
 Build a new "if" statement. More...
 
StmtResult RebuildSwitchStmtStart (SourceLocation SwitchLoc, Stmt *Init, Sema::ConditionResult Cond)
 Start building a new switch statement. More...
 
StmtResult RebuildSwitchStmtBody (SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body)
 Attach the body to the switch statement. More...
 
StmtResult RebuildWhileStmt (SourceLocation WhileLoc, Sema::ConditionResult Cond, Stmt *Body)
 Build a new while statement. More...
 
StmtResult RebuildDoStmt (SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation LParenLoc, Expr *Cond, SourceLocation RParenLoc)
 Build a new do-while statement. More...
 
StmtResult RebuildForStmt (SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *Init, Sema::ConditionResult Cond, Sema::FullExprArg Inc, SourceLocation RParenLoc, Stmt *Body)
 Build a new for statement. More...
 
StmtResult RebuildGotoStmt (SourceLocation GotoLoc, SourceLocation LabelLoc, LabelDecl *Label)
 Build a new goto statement. More...
 
StmtResult RebuildIndirectGotoStmt (SourceLocation GotoLoc, SourceLocation StarLoc, Expr *Target)
 Build a new indirect goto statement. More...
 
StmtResult RebuildReturnStmt (SourceLocation ReturnLoc, Expr *Result)
 Build a new return statement. More...
 
StmtResult RebuildDeclStmt (MutableArrayRef< Decl *> Decls, SourceLocation StartLoc, SourceLocation EndLoc)
 Build a new declaration statement. More...
 
StmtResult RebuildGCCAsmStmt (SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, SourceLocation RParenLoc)
 Build a new inline asm statement. More...
 
StmtResult RebuildMSAsmStmt (SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef< Token > AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef< StringRef > Constraints, ArrayRef< StringRef > Clobbers, ArrayRef< Expr *> Exprs, SourceLocation EndLoc)
 Build a new MS style inline asm statement. More...
 
StmtResult RebuildCoreturnStmt (SourceLocation CoreturnLoc, Expr *Result, bool IsImplicit)
 Build a new co_return statement. More...
 
ExprResult RebuildCoawaitExpr (SourceLocation CoawaitLoc, Expr *Result, bool IsImplicit)
 Build a new co_await expression. More...
 
ExprResult RebuildDependentCoawaitExpr (SourceLocation CoawaitLoc, Expr *Result, UnresolvedLookupExpr *Lookup)
 Build a new co_await expression. More...
 
ExprResult RebuildCoyieldExpr (SourceLocation CoyieldLoc, Expr *Result)
 Build a new co_yield expression. More...
 
StmtResult RebuildCoroutineBodyStmt (CoroutineBodyStmt::CtorArgs Args)
 
StmtResult RebuildObjCAtTryStmt (SourceLocation AtLoc, Stmt *TryBody, MultiStmtArg CatchStmts, Stmt *Finally)
 Build a new Objective-C @try statement. More...
 
VarDeclRebuildObjCExceptionDecl (VarDecl *ExceptionDecl, TypeSourceInfo *TInfo, QualType T)
 Rebuild an Objective-C exception declaration. More...
 
StmtResult RebuildObjCAtCatchStmt (SourceLocation AtLoc, SourceLocation RParenLoc, VarDecl *Var, Stmt *Body)
 Build a new Objective-C @catch statement. More...
 
StmtResult RebuildObjCAtFinallyStmt (SourceLocation AtLoc, Stmt *Body)
 Build a new Objective-C @finally statement. More...
 
StmtResult RebuildObjCAtThrowStmt (SourceLocation AtLoc, Expr *Operand)
 Build a new Objective-C @throw statement. More...
 
StmtResult RebuildOMPExecutableDirective (OpenMPDirectiveKind Kind, DeclarationNameInfo DirName, OpenMPDirectiveKind CancelRegion, ArrayRef< OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
 Build a new OpenMP executable directive. More...
 
OMPClauseRebuildOMPIfClause (OpenMPDirectiveKind NameModifier, Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
 Build a new OpenMP 'if' clause. More...
 
OMPClauseRebuildOMPFinalClause (Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'final' clause. More...
 
OMPClauseRebuildOMPNumThreadsClause (Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'num_threads' clause. More...
 
OMPClauseRebuildOMPSafelenClause (Expr *Len, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'safelen' clause. More...
 
OMPClauseRebuildOMPSimdlenClause (Expr *Len, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'simdlen' clause. More...
 
OMPClauseRebuildOMPCollapseClause (Expr *Num, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'collapse' clause. More...
 
OMPClauseRebuildOMPDefaultClause (OpenMPDefaultClauseKind Kind, SourceLocation KindKwLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'default' clause. More...
 
OMPClauseRebuildOMPProcBindClause (OpenMPProcBindClauseKind Kind, SourceLocation KindKwLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'proc_bind' clause. More...
 
OMPClauseRebuildOMPScheduleClause (OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
 Build a new OpenMP 'schedule' clause. More...
 
OMPClauseRebuildOMPOrderedClause (SourceLocation StartLoc, SourceLocation EndLoc, SourceLocation LParenLoc, Expr *Num)
 Build a new OpenMP 'ordered' clause. More...
 
OMPClauseRebuildOMPPrivateClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'private' clause. More...
 
OMPClauseRebuildOMPFirstprivateClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'firstprivate' clause. More...
 
OMPClauseRebuildOMPLastprivateClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'lastprivate' clause. More...
 
OMPClauseRebuildOMPSharedClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'shared' clause. More...
 
OMPClauseRebuildOMPReductionClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr *> UnresolvedReductions)
 Build a new OpenMP 'reduction' clause. More...
 
OMPClauseRebuildOMPTaskReductionClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr *> UnresolvedReductions)
 Build a new OpenMP 'task_reduction' clause. More...
 
OMPClauseRebuildOMPInReductionClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr *> UnresolvedReductions)
 Build a new OpenMP 'in_reduction' clause. More...
 
OMPClauseRebuildOMPLinearClause (ArrayRef< Expr *> VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind Modifier, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
 Build a new OpenMP 'linear' clause. More...
 
OMPClauseRebuildOMPAlignedClause (ArrayRef< Expr *> VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
 Build a new OpenMP 'aligned' clause. More...
 
OMPClauseRebuildOMPCopyinClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'copyin' clause. More...
 
OMPClauseRebuildOMPCopyprivateClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'copyprivate' clause. More...
 
OMPClauseRebuildOMPFlushClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'flush' pseudo clause. More...
 
OMPClauseRebuildOMPDependClause (OpenMPDependClauseKind DepKind, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'depend' pseudo clause. More...
 
OMPClauseRebuildOMPDeviceClause (Expr *Device, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'device' clause. More...
 
OMPClauseRebuildOMPMapClause (OpenMPMapClauseKind MapTypeModifier, OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'map' clause. More...
 
OMPClauseRebuildOMPNumTeamsClause (Expr *NumTeams, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'num_teams' clause. More...
 
OMPClauseRebuildOMPThreadLimitClause (Expr *ThreadLimit, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'thread_limit' clause. More...
 
OMPClauseRebuildOMPPriorityClause (Expr *Priority, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'priority' clause. More...
 
OMPClauseRebuildOMPGrainsizeClause (Expr *Grainsize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'grainsize' clause. More...
 
OMPClauseRebuildOMPNumTasksClause (Expr *NumTasks, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'num_tasks' clause. More...
 
OMPClauseRebuildOMPHintClause (Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'hint' clause. More...
 
OMPClauseRebuildOMPDistScheduleClause (OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
 Build a new OpenMP 'dist_schedule' clause. More...
 
OMPClauseRebuildOMPToClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'to' clause. More...
 
OMPClauseRebuildOMPFromClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'from' clause. More...
 
OMPClauseRebuildOMPUseDevicePtrClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'use_device_ptr' clause. More...
 
OMPClauseRebuildOMPIsDevicePtrClause (ArrayRef< Expr *> VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build a new OpenMP 'is_device_ptr' clause. More...
 
ExprResult RebuildObjCAtSynchronizedOperand (SourceLocation atLoc, Expr *object)
 Rebuild the operand to an Objective-C @synchronized statement. More...
 
StmtResult RebuildObjCAtSynchronizedStmt (SourceLocation AtLoc, Expr *Object, Stmt *Body)
 Build a new Objective-C @synchronized statement. More...
 
StmtResult RebuildObjCAutoreleasePoolStmt (SourceLocation AtLoc, Stmt *Body)
 Build a new Objective-C @autoreleasepool statement. More...
 
StmtResult RebuildObjCForCollectionStmt (SourceLocation ForLoc, Stmt *Element, Expr *Collection, SourceLocation RParenLoc, Stmt *Body)
 Build a new Objective-C fast enumeration statement. More...
 
VarDeclRebuildExceptionDecl (VarDecl *ExceptionDecl, TypeSourceInfo *Declarator, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id)
 Build a new C++ exception declaration. More...
 
StmtResult RebuildCXXCatchStmt (SourceLocation CatchLoc, VarDecl *ExceptionDecl, Stmt *Handler)
 Build a new C++ catch statement. More...
 
StmtResult RebuildCXXTryStmt (SourceLocation TryLoc, Stmt *TryBlock, ArrayRef< Stmt *> Handlers)
 Build a new C++ try statement. More...
 
StmtResult RebuildCXXForRangeStmt (SourceLocation ForLoc, SourceLocation CoawaitLoc, SourceLocation ColonLoc, Stmt *Range, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVar, SourceLocation RParenLoc)
 Build a new C++0x range-based for statement. More...
 
StmtResult RebuildMSDependentExistsStmt (SourceLocation KeywordLoc, bool IsIfExists, NestedNameSpecifierLoc QualifierLoc, DeclarationNameInfo NameInfo, Stmt *Nested)
 Build a new C++0x range-based for statement. More...
 
StmtResult FinishCXXForRangeStmt (Stmt *ForRange, Stmt *Body)
 Attach body to a C++0x range-based for statement. More...
 
StmtResult RebuildSEHTryStmt (bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler)
 
StmtResult RebuildSEHExceptStmt (SourceLocation Loc, Expr *FilterExpr, Stmt *Block)
 
StmtResult RebuildSEHFinallyStmt (SourceLocation Loc, Stmt *Block)
 
ExprResult RebuildPredefinedExpr (SourceLocation Loc, PredefinedExpr::IdentType IT)
 Build a new predefined expression. More...
 
ExprResult RebuildDeclarationNameExpr (const CXXScopeSpec &SS, LookupResult &R, bool RequiresADL)
 Build a new expression that references a declaration. More...
 
ExprResult RebuildDeclRefExpr (NestedNameSpecifierLoc QualifierLoc, ValueDecl *VD, const DeclarationNameInfo &NameInfo, TemplateArgumentListInfo *TemplateArgs)
 Build a new expression that references a declaration. More...
 
ExprResult RebuildParenExpr (Expr *SubExpr, SourceLocation LParen, SourceLocation RParen)
 Build a new expression in parentheses. More...
 
ExprResult RebuildCXXPseudoDestructorExpr (Expr *Base, SourceLocation OperatorLoc, bool isArrow, CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage Destroyed)
 Build a new pseudo-destructor expression. More...
 
ExprResult RebuildUnaryOperator (SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *SubExpr)
 Build a new unary operator expression. More...
 
ExprResult RebuildOffsetOfExpr (SourceLocation OperatorLoc, TypeSourceInfo *Type, ArrayRef< Sema::OffsetOfComponent > Components, SourceLocation RParenLoc)
 Build a new builtin offsetof expression. More...
 
ExprResult RebuildUnaryExprOrTypeTrait (TypeSourceInfo *TInfo, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R)
 Build a new sizeof, alignof or vec_step expression with a type argument. More...
 
ExprResult RebuildUnaryExprOrTypeTrait (Expr *SubExpr, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R)
 Build a new sizeof, alignof or vec step expression with an expression argument. More...
 
ExprResult RebuildArraySubscriptExpr (Expr *LHS, SourceLocation LBracketLoc, Expr *RHS, SourceLocation RBracketLoc)
 Build a new array subscript expression. More...
 
ExprResult RebuildOMPArraySectionExpr (Expr *Base, SourceLocation LBracketLoc, Expr *LowerBound, SourceLocation ColonLoc, Expr *Length, SourceLocation RBracketLoc)
 Build a new array section expression. More...
 
ExprResult RebuildCallExpr (Expr *Callee, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig=nullptr)
 Build a new call expression. More...
 
ExprResult RebuildMemberExpr (Expr *Base, SourceLocation OpLoc, bool isArrow, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &MemberNameInfo, ValueDecl *Member, NamedDecl *FoundDecl, const TemplateArgumentListInfo *ExplicitTemplateArgs, NamedDecl *FirstQualifierInScope)
 Build a new member access expression. More...
 
ExprResult RebuildBinaryOperator (SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHS, Expr *RHS)
 Build a new binary operator expression. More...
 
ExprResult RebuildConditionalOperator (Expr *Cond, SourceLocation QuestionLoc, Expr *LHS, SourceLocation ColonLoc, Expr *RHS)
 Build a new conditional operator expression. More...
 
ExprResult RebuildCStyleCastExpr (SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *SubExpr)
 Build a new C-style cast expression. More...
 
ExprResult RebuildCompoundLiteralExpr (SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *Init)
 Build a new compound literal expression. More...
 
ExprResult RebuildExtVectorElementExpr (Expr *Base, SourceLocation OpLoc, SourceLocation AccessorLoc, IdentifierInfo &Accessor)
 Build a new extended vector element access expression. More...
 
ExprResult RebuildInitList (SourceLocation LBraceLoc, MultiExprArg Inits, SourceLocation RBraceLoc, QualType ResultTy)
 Build a new initializer list expression. More...
 
ExprResult RebuildDesignatedInitExpr (Designation &Desig, MultiExprArg ArrayExprs, SourceLocation EqualOrColonLoc, bool GNUSyntax, Expr *Init)
 Build a new designated initializer expression. More...
 
ExprResult RebuildImplicitValueInitExpr (QualType T)
 Build a new value-initialized expression. More...
 
ExprResult RebuildVAArgExpr (SourceLocation BuiltinLoc, Expr *SubExpr, TypeSourceInfo *TInfo, SourceLocation RParenLoc)
 Build a new va_arg expression. More...
 
ExprResult RebuildParenListExpr (SourceLocation LParenLoc, MultiExprArg SubExprs, SourceLocation RParenLoc)
 Build a new expression list in parentheses. More...
 
ExprResult RebuildAddrLabelExpr (SourceLocation AmpAmpLoc, SourceLocation LabelLoc, LabelDecl *Label)
 Build a new address-of-label expression. More...
 
ExprResult RebuildStmtExpr (SourceLocation LParenLoc, Stmt *SubStmt, SourceLocation RParenLoc)
 Build a new GNU statement expression. More...
 
ExprResult RebuildChooseExpr (SourceLocation BuiltinLoc, Expr *Cond, Expr *LHS, Expr *RHS, SourceLocation RParenLoc)
 Build a new __builtin_choose_expr expression. More...
 
ExprResult RebuildGenericSelectionExpr (SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< TypeSourceInfo *> Types, ArrayRef< Expr *> Exprs)
 Build a new generic selection expression. More...
 
ExprResult RebuildCXXOperatorCallExpr (OverloadedOperatorKind Op, SourceLocation OpLoc, Expr *Callee, Expr *First, Expr *Second)
 Build a new overloaded operator call expression. More...
 
ExprResult RebuildCXXNamedCastExpr (SourceLocation OpLoc, Stmt::StmtClass Class, SourceLocation LAngleLoc, TypeSourceInfo *TInfo, SourceLocation RAngleLoc, SourceLocation LParenLoc, Expr *SubExpr, SourceLocation RParenLoc)
 Build a new C++ "named" cast expression, such as static_cast or reinterpret_cast. More...
 
ExprResult RebuildCXXStaticCastExpr (SourceLocation OpLoc, SourceLocation LAngleLoc, TypeSourceInfo *TInfo, SourceLocation RAngleLoc, SourceLocation LParenLoc, Expr *SubExpr, SourceLocation RParenLoc)
 Build a new C++ static_cast expression. More...
 
ExprResult RebuildCXXDynamicCastExpr (SourceLocation OpLoc, SourceLocation LAngleLoc, TypeSourceInfo *TInfo, SourceLocation RAngleLoc, SourceLocation LParenLoc, Expr *SubExpr, SourceLocation RParenLoc)
 Build a new C++ dynamic_cast expression. More...
 
ExprResult RebuildCXXReinterpretCastExpr (SourceLocation OpLoc, SourceLocation LAngleLoc, TypeSourceInfo *TInfo, SourceLocation RAngleLoc, SourceLocation LParenLoc, Expr *SubExpr, SourceLocation RParenLoc)
 Build a new C++ reinterpret_cast expression. More...
 
ExprResult RebuildCXXConstCastExpr (SourceLocation OpLoc, SourceLocation LAngleLoc, TypeSourceInfo *TInfo, SourceLocation RAngleLoc, SourceLocation LParenLoc, Expr *SubExpr, SourceLocation RParenLoc)
 Build a new C++ const_cast expression. More...
 
ExprResult RebuildCXXFunctionalCastExpr (TypeSourceInfo *TInfo, SourceLocation LParenLoc, Expr *Sub, SourceLocation RParenLoc)
 Build a new C++ functional-style cast expression. More...
 
ExprResult RebuildCXXTypeidExpr (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
 Build a new C++ typeid(type) expression. More...
 
ExprResult RebuildCXXTypeidExpr (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc)
 Build a new C++ typeid(expr) expression. More...
 
ExprResult RebuildCXXUuidofExpr (QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
 Build a new C++ __uuidof(type) expression. More...
 
ExprResult RebuildCXXUuidofExpr (QualType TypeInfoType, SourceLocation TypeidLoc, Expr *Operand, SourceLocation RParenLoc)
 Build a new C++ __uuidof(expr) expression. More...
 
ExprResult RebuildCXXThisExpr (SourceLocation ThisLoc, QualType ThisType, bool isImplicit)
 Build a new C++ "this" expression. More...
 
ExprResult RebuildCXXThrowExpr (SourceLocation ThrowLoc, Expr *Sub, bool IsThrownVariableInScope)
 Build a new C++ throw expression. More...
 
ExprResult RebuildCXXDefaultArgExpr (SourceLocation Loc, ParmVarDecl *Param)
 Build a new C++ default-argument expression. More...
 
ExprResult RebuildCXXDefaultInitExpr (SourceLocation Loc, FieldDecl *Field)
 Build a new C++11 default-initialization expression. More...
 
ExprResult RebuildCXXScalarValueInitExpr (TypeSourceInfo *TSInfo, SourceLocation LParenLoc, SourceLocation RParenLoc)
 Build a new C++ zero-initialization expression. More...
 
ExprResult RebuildCXXNewExpr (SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocatedType, TypeSourceInfo *AllocatedTypeInfo, Expr *ArraySize, SourceRange DirectInitRange, Expr *Initializer)
 Build a new C++ "new" expression. More...
 
ExprResult RebuildCXXDeleteExpr (SourceLocation StartLoc, bool IsGlobalDelete, bool IsArrayForm, Expr *Operand)
 Build a new C++ "delete" expression. More...
 
ExprResult RebuildTypeTrait (TypeTrait Trait, SourceLocation StartLoc, ArrayRef< TypeSourceInfo *> Args, SourceLocation RParenLoc)
 Build a new type trait expression. More...
 
ExprResult RebuildArrayTypeTrait (ArrayTypeTrait Trait, SourceLocation StartLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParenLoc)
 Build a new array type trait expression. More...
 
ExprResult RebuildExpressionTrait (ExpressionTrait Trait, SourceLocation StartLoc, Expr *Queried, SourceLocation RParenLoc)
 Build a new expression trait expression. More...
 
ExprResult RebuildDependentScopeDeclRefExpr (NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, bool IsAddressOfOperand, TypeSourceInfo **RecoveryTSI)
 Build a new (previously unresolved) declaration reference expression. More...
 
ExprResult RebuildTemplateIdExpr (const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs)
 Build a new template-id expression. More...
 
ExprResult RebuildCXXConstructExpr (QualType T, SourceLocation Loc, CXXConstructorDecl *Constructor, bool IsElidable, MultiExprArg Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool RequiresZeroInit, CXXConstructExpr::ConstructionKind ConstructKind, SourceRange ParenRange)
 Build a new object-construction expression. More...
 
ExprResult RebuildCXXInheritedCtorInitExpr (QualType T, SourceLocation Loc, CXXConstructorDecl *Constructor, bool ConstructsVBase, bool InheritedFromVBase)
 Build a new implicit construction via inherited constructor expression. More...
 
ExprResult RebuildCXXTemporaryObjectExpr (TypeSourceInfo *TSInfo, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
 Build a new object-construction expression. More...
 
ExprResult RebuildCXXUnresolvedConstructExpr (TypeSourceInfo *TSInfo, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
 Build a new object-construction expression. More...
 
ExprResult RebuildCXXDependentScopeMemberExpr (Expr *BaseE, QualType BaseType, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs)
 Build a new member reference expression. More...
 
ExprResult RebuildUnresolvedMemberExpr (Expr *BaseE, QualType BaseType, SourceLocation OperatorLoc, bool IsArrow, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs)
 Build a new member reference expression. More...
 
ExprResult RebuildCXXNoexceptExpr (SourceRange Range, Expr *Arg)
 Build a new noexcept expression. More...
 
ExprResult RebuildSizeOfPackExpr (SourceLocation OperatorLoc, NamedDecl *Pack, SourceLocation PackLoc, SourceLocation RParenLoc, Optional< unsigned > Length, ArrayRef< TemplateArgument > PartialArgs)
 Build a new expression to compute the length of a parameter pack. More...
 
ExprResult RebuildObjCBoxedExpr (SourceRange SR, Expr *ValueExpr)
 Build a new Objective-C boxed expression. More...
 
ExprResult RebuildObjCArrayLiteral (SourceRange Range, Expr **Elements, unsigned NumElements)
 Build a new Objective-C array literal. More...
 
ExprResult RebuildObjCSubscriptRefExpr (SourceLocation RB, Expr *Base, Expr *Key, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod)
 
ExprResult RebuildObjCDictionaryLiteral (SourceRange Range, MutableArrayRef< ObjCDictionaryElement > Elements)
 Build a new Objective-C dictionary literal. More...
 
ExprResult RebuildObjCEncodeExpr (SourceLocation AtLoc, TypeSourceInfo *EncodeTypeInfo, SourceLocation RParenLoc)
 Build a new Objective-C @encode expression. More...
 
ExprResult RebuildObjCMessageExpr (TypeSourceInfo *ReceiverTypeInfo, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, SourceLocation LBracLoc, MultiExprArg Args, SourceLocation RBracLoc)
 Build a new Objective-C class message. More...
 
ExprResult RebuildObjCMessageExpr (Expr *Receiver, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, SourceLocation LBracLoc, MultiExprArg Args, SourceLocation RBracLoc)
 Build a new Objective-C instance message. More...
 
ExprResult RebuildObjCMessageExpr (SourceLocation SuperLoc, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, QualType SuperType, ObjCMethodDecl *Method, SourceLocation LBracLoc, MultiExprArg Args, SourceLocation RBracLoc)
 Build a new Objective-C instance/class message to 'super'. More...
 
ExprResult RebuildObjCIvarRefExpr (Expr *BaseArg, ObjCIvarDecl *Ivar, SourceLocation IvarLoc, bool IsArrow, bool IsFreeIvar)
 Build a new Objective-C ivar reference expression. More...
 
ExprResult RebuildObjCPropertyRefExpr (Expr *BaseArg, ObjCPropertyDecl *Property, SourceLocation PropertyLoc)
 Build a new Objective-C property reference expression. More...
 
ExprResult RebuildObjCPropertyRefExpr (Expr *Base, QualType T, ObjCMethodDecl *Getter, ObjCMethodDecl *Setter, SourceLocation PropertyLoc)
 Build a new Objective-C property reference expression. More...
 
ExprResult RebuildObjCIsaExpr (Expr *BaseArg, SourceLocation IsaLoc, SourceLocation OpLoc, bool IsArrow)
 Build a new Objective-C "isa" expression. More...
 
ExprResult RebuildShuffleVectorExpr (SourceLocation BuiltinLoc, MultiExprArg SubExprs, SourceLocation RParenLoc)
 Build a new shuffle vector expression. More...
 
ExprResult RebuildConvertVectorExpr (SourceLocation BuiltinLoc, Expr *SrcExpr, TypeSourceInfo *DstTInfo, SourceLocation RParenLoc)
 Build a new convert vector expression. More...
 
TemplateArgumentLoc RebuildPackExpansion (TemplateArgumentLoc Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
 Build a new template argument pack expansion. More...
 
ExprResult RebuildPackExpansion (Expr *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
 Build a new expression pack expansion. More...
 
ExprResult RebuildCXXFoldExpr (SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
 Build a new C++1z fold-expression. More...
 
ExprResult RebuildEmptyCXXFoldExpr (SourceLocation EllipsisLoc, BinaryOperatorKind Operator)
 Build an empty C++1z fold-expression with the given operator. More...
 
ExprResult RebuildAtomicExpr (SourceLocation BuiltinLoc, MultiExprArg SubExprs, QualType RetTy, AtomicExpr::AtomicOp Op, SourceLocation RParenLoc)
 Build a new atomic operation expression. More...
 
template<typename Derived >
QualType TransformFunctionProtoType (TypeLocBuilder &TLB, FunctionProtoTypeLoc TL)
 
QualType TransformTypeWithDeducedTST (QualType T)
 Transform a type that is permitted to produce a DeducedTemplateSpecializationType. More...
 
TypeSourceInfoTransformTypeWithDeducedTST (TypeSourceInfo *DI)
 

Static Public Member Functions

static ExprResult Owned (Expr *E)
 
static StmtResult Owned (Stmt *S)
 

Protected Attributes

SemaSemaRef
 
llvm::DenseMap< Decl *, Decl * > TransformedLocalDecls
 The set of local declarations that have been transformed, for cases where we are forced to build new declarations within the transformer rather than in the subclass (e.g., lambda closure types). More...
 

Detailed Description

template<typename Derived>
class clang::TreeTransform< Derived >

A semantic tree transformation that allows one to transform one abstract syntax tree into another.

A new tree transformation is defined by creating a new subclass X of TreeTransform<X> and then overriding certain operations to provide behavior specific to that transformation. For example, template instantiation is implemented as a tree transformation where the transformation of TemplateTypeParmType nodes involves substituting the template arguments for their corresponding template parameters; a similar transformation is performed for non-type template parameters and template template parameters.

This tree-transformation template uses static polymorphism to allow subclasses to customize any of its operations. Thus, a subclass can override any of the transformation or rebuild operators by providing an operation with the same signature as the default implementation. The overridding function should not be virtual.

Semantic tree transformations are split into two stages, either of which can be replaced by a subclass. The "transform" step transforms an AST node or the parts of an AST node using the various transformation functions, then passes the pieces on to the "rebuild" step, which constructs a new AST node of the appropriate kind from the pieces. The default transformation routines recursively transform the operands to composite AST nodes (e.g., the pointee type of a PointerType node) and, if any of those operand nodes were changed by the transformation, invokes the rebuild operation to create a new AST node.

Subclasses can customize the transformation at various levels. The most coarse-grained transformations involve replacing TransformType(), TransformExpr(), TransformDecl(), TransformNestedNameSpecifierLoc(), TransformTemplateName(), or TransformTemplateArgument() with entirely new implementations.

For more fine-grained transformations, subclasses can replace any of the TransformXXX functions (where XXX is the name of an AST node, e.g., PointerType, StmtExpr) to alter the transformation. As mentioned previously, replacing TransformTemplateTypeParmType() allows template instantiation to substitute template arguments for their corresponding template parameters. Additionally, subclasses can override the RebuildXXX functions to control how AST nodes are rebuilt when their operands change. By default, TreeTransform will invoke semantic analysis to rebuild AST nodes. However, certain other tree transformations (e.g, cloning) may be able to use more efficient rebuild steps.

There are a handful of other functions that can be overridden, allowing one to avoid traversing nodes that don't need any transformation (AlreadyTransformed()), force rebuilding AST nodes even when their operands have not changed (AlwaysRebuild()), and customize the default locations and entity names used for type-checking (getBaseLocation(), getBaseEntity()).

Definition at line 96 of file TreeTransform.h.

Constructor & Destructor Documentation

◆ TreeTransform()

template<typename Derived>
clang::TreeTransform< Derived >::TreeTransform ( Sema SemaRef)
inline

Initializes a new tree transformer.

Definition at line 124 of file TreeTransform.h.

Member Function Documentation

◆ AlreadyTransformed()

template<typename Derived>
bool clang::TreeTransform< Derived >::AlreadyTransformed ( QualType  T)
inline

Determine whether the given type T has already been transformed.

Subclasses can provide an alternative implementation of this routine to short-circuit evaluation when it is known that a given type will not change. For example, template instantiation need not traverse non-dependent types.

Definition at line 203 of file TreeTransform.h.

References clang::QualType::isNull().

◆ AlwaysRebuild()

template<typename Derived>
bool clang::TreeTransform< Derived >::AlwaysRebuild ( )
inline

Whether the transformation should always rebuild AST nodes, even if none of the children have changed.

Subclasses may override this function to specify when the transformation should rebuild all AST nodes.

We must always rebuild all AST nodes when performing variadic template pack expansion, in order to avoid violating the AST invariant that each statement node appears at most once in its containing declaration.

Definition at line 150 of file TreeTransform.h.

References clang::Sema::ArgumentPackSubstitutionIndex.

◆ DropCallArgument()

template<typename Derived>
bool clang::TreeTransform< Derived >::DropCallArgument ( Expr E)
inline

Determine whether the given call argument should be dropped, e.g., because it is a default argument.

Subclasses can provide an alternative implementation of this routine to determine which kinds of call arguments get dropped. By default, CXXDefaultArgument nodes are dropped (prior to transformation).

Definition at line 213 of file TreeTransform.h.

◆ ExpandingFunctionParameterPack()

template<typename Derived>
void clang::TreeTransform< Derived >::ExpandingFunctionParameterPack ( ParmVarDecl Pack)
inline

Note to the derived class when a function parameter pack is being expanded.

Definition at line 282 of file TreeTransform.h.

References clang::T.

◆ FinishCXXForRangeStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::FinishCXXForRangeStmt ( Stmt ForRange,
Stmt Body 
)
inline

Attach body to a C++0x range-based for statement.

By default, performs semantic analysis to finish the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 2060 of file TreeTransform.h.

◆ ForgetPartiallySubstitutedPack()

template<typename Derived>
TemplateArgument clang::TreeTransform< Derived >::ForgetPartiallySubstitutedPack ( )
inline

"Forget" about the partially-substituted pack template argument, when performing an instantiation that must preserve the parameter pack use.

This routine is meant to be overridden by the template instantiator.

Definition at line 269 of file TreeTransform.h.

◆ getBaseEntity()

template<typename Derived>
DeclarationName clang::TreeTransform< Derived >::getBaseEntity ( )
inline

Returns the name of the entity being transformed, if that information was not available elsewhere in the AST.

By default, returns an empty name. Subclasses can provide an alternative implementation with a more precise name.

Definition at line 165 of file TreeTransform.h.

◆ getBaseLocation()

template<typename Derived>
SourceLocation clang::TreeTransform< Derived >::getBaseLocation ( )
inline

Returns the location of the entity being transformed, if that information was not available elsewhere in the AST.

By default, returns no source-location information. Subclasses can provide an alternative implementation that provides better location information.

Definition at line 158 of file TreeTransform.h.

◆ getDerived() [1/2]

template<typename Derived>
Derived& clang::TreeTransform< Derived >::getDerived ( )
inline

Retrieves a reference to the derived class.

Definition at line 127 of file TreeTransform.h.

Referenced by clang::TreeTransform< Derived >::TemporaryBase::TemporaryBase(), and clang::TreeTransform< Derived >::TemporaryBase::~TemporaryBase().

◆ getDerived() [2/2]

template<typename Derived>
const Derived& clang::TreeTransform< Derived >::getDerived ( ) const
inline

Retrieves a reference to the derived class.

Definition at line 130 of file TreeTransform.h.

◆ getSema()

template<typename Derived>
Sema& clang::TreeTransform< Derived >::getSema ( ) const
inline

Retrieves a reference to the semantic analysis object used for this tree transform.

Definition at line 139 of file TreeTransform.h.

◆ InventTemplateArgumentLoc()

template<typename Derived >
void clang::TreeTransform< Derived >::InventTemplateArgumentLoc ( const TemplateArgument Arg,
TemplateArgumentLoc ArgLoc 
)

◆ InventTypeSourceInfo()

template<typename Derived>
TypeSourceInfo* clang::TreeTransform< Derived >::InventTypeSourceInfo ( QualType  T)
inline

Fakes up a TypeSourceInfo for a type.

Definition at line 586 of file TreeTransform.h.

References clang::Sema::Context, and clang::ASTContext::getTrivialTypeSourceInfo().

◆ Owned() [1/2]

template<typename Derived>
static ExprResult clang::TreeTransform< Derived >::Owned ( Expr E)
inlinestatic

Definition at line 134 of file TreeTransform.h.

◆ Owned() [2/2]

template<typename Derived>
static StmtResult clang::TreeTransform< Derived >::Owned ( Stmt S)
inlinestatic

Definition at line 135 of file TreeTransform.h.

◆ RebuildAddrLabelExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildAddrLabelExpr ( SourceLocation  AmpAmpLoc,
SourceLocation  LabelLoc,
LabelDecl Label 
)
inline

Build a new address-of-label expression.

By default, performs semantic analysis, using the name of the label rather than attempting to map the label statement itself. Subclasses may override this routine to provide different behavior.

Definition at line 2423 of file TreeTransform.h.

◆ RebuildArraySubscriptExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildArraySubscriptExpr ( Expr LHS,
SourceLocation  LBracketLoc,
Expr RHS,
SourceLocation  RBracketLoc 
)
inline

Build a new array subscript expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2190 of file TreeTransform.h.

◆ RebuildArrayType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildArrayType ( QualType  ElementType,
ArrayType::ArraySizeModifier  SizeMod,
const llvm::APInt *  Size,
Expr SizeExpr,
unsigned  IndexTypeQuals,
SourceRange  BracketsRange 
)

Build a new array type given the element type, size modifier, size of the array (if known), size expression, and index type qualifiers.

By default, performs semantic analysis when building the array type. Subclasses may override this routine to provide different behavior. Also by default, all of the other Rebuild*Array

Definition at line 12294 of file TreeTransform.h.

◆ RebuildArrayTypeTrait()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildArrayTypeTrait ( ArrayTypeTrait  Trait,
SourceLocation  StartLoc,
TypeSourceInfo TSInfo,
Expr DimExpr,
SourceLocation  RParenLoc 
)
inline

Build a new array type trait expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2755 of file TreeTransform.h.

◆ RebuildAtomicExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildAtomicExpr ( SourceLocation  BuiltinLoc,
MultiExprArg  SubExprs,
QualType  RetTy,
AtomicExpr::AtomicOp  Op,
SourceLocation  RParenLoc 
)
inline

Build a new atomic operation expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 3236 of file TreeTransform.h.

References clang::Sema::Context.

◆ RebuildAtomicType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildAtomicType ( QualType  ValueType,
SourceLocation  KWLoc 
)

Build a new atomic type given its value type.

By default, performs semantic analysis when building the atomic type. Subclasses may override this routine to provide different behavior.

Definition at line 12510 of file TreeTransform.h.

◆ RebuildAttributedStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildAttributedStmt ( SourceLocation  AttrLoc,
ArrayRef< const Attr *>  Attrs,
Stmt SubStmt 
)
inline

Build a new label statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1238 of file TreeTransform.h.

References clang::Sema::ActOnAttributedStmt().

◆ RebuildAutoType()

template<typename Derived>
QualType clang::TreeTransform< Derived >::RebuildAutoType ( QualType  Deduced,
AutoTypeKeyword  Keyword 
)
inline

Build a new C++11 auto type.

By default, builds a new AutoType with the given deduced type.

Definition at line 905 of file TreeTransform.h.

References clang::Sema::Context, and clang::ASTContext::getAutoType().

◆ RebuildBinaryOperator()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildBinaryOperator ( SourceLocation  OpLoc,
BinaryOperatorKind  Opc,
Expr LHS,
Expr RHS 
)
inline

Build a new binary operator expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2286 of file TreeTransform.h.

◆ RebuildBlockPointerType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildBlockPointerType ( QualType  PointeeType,
SourceLocation  Sigil 
)

Build a new block pointer type given its pointee type.

By default, performs semantic analysis when building the block pointer type. Subclasses may override this routine to provide different behavior.

Definition at line 12230 of file TreeTransform.h.

◆ RebuildCallExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCallExpr ( Expr Callee,
SourceLocation  LParenLoc,
MultiExprArg  Args,
SourceLocation  RParenLoc,
Expr ExecConfig = nullptr 
)
inline

Build a new call expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2215 of file TreeTransform.h.

◆ RebuildCaseStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildCaseStmt ( SourceLocation  CaseLoc,
Expr LHS,
SourceLocation  EllipsisLoc,
Expr RHS,
SourceLocation  ColonLoc 
)
inline

Build a new case statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1196 of file TreeTransform.h.

◆ RebuildCaseStmtBody()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildCaseStmtBody ( Stmt S,
Stmt Body 
)
inline

Attach the body to a new case statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1209 of file TreeTransform.h.

◆ RebuildChooseExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildChooseExpr ( SourceLocation  BuiltinLoc,
Expr Cond,
Expr LHS,
Expr RHS,
SourceLocation  RParenLoc 
)
inline

Build a new __builtin_choose_expr expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2442 of file TreeTransform.h.

References clang::Sema::ActOnChooseExpr().

◆ RebuildCoawaitExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCoawaitExpr ( SourceLocation  CoawaitLoc,
Expr Result,
bool  IsImplicit 
)
inline

Build a new co_await expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 1387 of file TreeTransform.h.

◆ RebuildCompoundLiteralExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCompoundLiteralExpr ( SourceLocation  LParenLoc,
TypeSourceInfo TInfo,
SourceLocation  RParenLoc,
Expr Init 
)
inline

Build a new compound literal expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2321 of file TreeTransform.h.

◆ RebuildCompoundStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildCompoundStmt ( SourceLocation  LBraceLoc,
MultiStmtArg  Statements,
SourceLocation  RBraceLoc,
bool  IsStmtExpr 
)
inline

Build a new compound statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1184 of file TreeTransform.h.

◆ RebuildConditionalOperator()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildConditionalOperator ( Expr Cond,
SourceLocation  QuestionLoc,
Expr LHS,
SourceLocation  ColonLoc,
Expr RHS 
)
inline

Build a new conditional operator expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2296 of file TreeTransform.h.

◆ RebuildConstantArrayType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildConstantArrayType ( QualType  ElementType,
ArrayType::ArraySizeModifier  SizeMod,
const llvm::APInt &  Size,
unsigned  IndexTypeQuals,
SourceRange  BracketsRange 
)

Build a new constant array type given the element type, size modifier, (known) size of the array, and index type qualifiers.

By default, performs semantic analysis when building the array type. Subclasses may override this routine to provide different behavior.

Definition at line 12330 of file TreeTransform.h.

◆ RebuildConvertVectorExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildConvertVectorExpr ( SourceLocation  BuiltinLoc,
Expr SrcExpr,
TypeSourceInfo DstTInfo,
SourceLocation  RParenLoc 
)
inline

Build a new convert vector expression.

Definition at line 3146 of file TreeTransform.h.

References clang::Sema::SemaConvertVectorExpr().

◆ RebuildCoreturnStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildCoreturnStmt ( SourceLocation  CoreturnLoc,
Expr Result,
bool  IsImplicit 
)
inline

Build a new co_return statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1378 of file TreeTransform.h.

◆ RebuildCoroutineBodyStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildCoroutineBodyStmt ( CoroutineBodyStmt::CtorArgs  Args)
inline

Definition at line 1410 of file TreeTransform.h.

◆ RebuildCoyieldExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCoyieldExpr ( SourceLocation  CoyieldLoc,
Expr Result 
)
inline

Build a new co_yield expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 1406 of file TreeTransform.h.

◆ RebuildCStyleCastExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCStyleCastExpr ( SourceLocation  LParenLoc,
TypeSourceInfo TInfo,
SourceLocation  RParenLoc,
Expr SubExpr 
)
inline

Build a new C-style cast expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2309 of file TreeTransform.h.

◆ RebuildCXXCatchStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildCXXCatchStmt ( SourceLocation  CatchLoc,
VarDecl ExceptionDecl,
Stmt Handler 
)
inline

Build a new C++ catch statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1993 of file TreeTransform.h.

◆ RebuildCXXConstCastExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXConstCastExpr ( SourceLocation  OpLoc,
SourceLocation  LAngleLoc,
TypeSourceInfo TInfo,
SourceLocation  RAngleLoc,
SourceLocation  LParenLoc,
Expr SubExpr,
SourceLocation  RParenLoc 
)
inline

Build a new C++ const_cast expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2574 of file TreeTransform.h.

◆ RebuildCXXConstructExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXConstructExpr ( QualType  T,
SourceLocation  Loc,
CXXConstructorDecl Constructor,
bool  IsElidable,
MultiExprArg  Args,
bool  HadMultipleCandidates,
bool  ListInitialization,
bool  StdInitListInitialization,
bool  RequiresZeroInit,
CXXConstructExpr::ConstructionKind  ConstructKind,
SourceRange  ParenRange 
)
inline

Build a new object-construction expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2814 of file TreeTransform.h.

References clang::ExprError().

◆ RebuildCXXDefaultArgExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXDefaultArgExpr ( SourceLocation  Loc,
ParmVarDecl Param 
)
inline

Build a new C++ default-argument expression.

By default, builds a new default-argument expression, which does not require any semantic analysis. Subclasses may override this routine to provide different behavior.

Definition at line 2675 of file TreeTransform.h.

References clang::CXXDefaultArgExpr::Create().

◆ RebuildCXXDefaultInitExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXDefaultInitExpr ( SourceLocation  Loc,
FieldDecl Field 
)
inline

Build a new C++11 default-initialization expression.

By default, builds a new default field initialization expression, which does not require any semantic analysis. Subclasses may override this routine to provide different behavior.

Definition at line 2685 of file TreeTransform.h.

References clang::CXXDefaultInitExpr::Create().

◆ RebuildCXXDeleteExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXDeleteExpr ( SourceLocation  StartLoc,
bool  IsGlobalDelete,
bool  IsArrayForm,
Expr Operand 
)
inline

Build a new C++ "delete" expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2732 of file TreeTransform.h.

◆ RebuildCXXDependentScopeMemberExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXDependentScopeMemberExpr ( Expr BaseE,
QualType  BaseType,
bool  IsArrow,
SourceLocation  OperatorLoc,
NestedNameSpecifierLoc  QualifierLoc,
SourceLocation  TemplateKWLoc,
NamedDecl FirstQualifierInScope,
const DeclarationNameInfo MemberNameInfo,
const TemplateArgumentListInfo TemplateArgs 
)
inline

Build a new member reference expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2882 of file TreeTransform.h.

References clang::CXXScopeSpec::Adopt(), and clang::Sema::BuildMemberReferenceExpr().

◆ RebuildCXXDynamicCastExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXDynamicCastExpr ( SourceLocation  OpLoc,
SourceLocation  LAngleLoc,
TypeSourceInfo TInfo,
SourceLocation  RAngleLoc,
SourceLocation  LParenLoc,
Expr SubExpr,
SourceLocation  RParenLoc 
)
inline

Build a new C++ dynamic_cast expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2540 of file TreeTransform.h.

◆ RebuildCXXFoldExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXFoldExpr ( SourceLocation  LParenLoc,
Expr LHS,
BinaryOperatorKind  Operator,
SourceLocation  EllipsisLoc,
Expr RHS,
SourceLocation  RParenLoc 
)
inline

Build a new C++1z fold-expression.

By default, performs semantic analysis in order to build a new fold expression.

Definition at line 3215 of file TreeTransform.h.

◆ RebuildCXXForRangeStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildCXXForRangeStmt ( SourceLocation  ForLoc,
SourceLocation  CoawaitLoc,
SourceLocation  ColonLoc,
Stmt Range,
Stmt Begin,
Stmt End,
Expr Cond,
Expr Inc,
Stmt LoopVar,
SourceLocation  RParenLoc 
)
inline

Build a new C++0x range-based for statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 2013 of file TreeTransform.h.

References clang::Sema::BFRK_Rebuild, clang::Expr::getType(), clang::Type::isObjCObjectPointerType(), clang::Expr::isTypeDependent(), and clang::StmtError().

◆ RebuildCXXFunctionalCastExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXFunctionalCastExpr ( TypeSourceInfo TInfo,
SourceLocation  LParenLoc,
Expr Sub,
SourceLocation  RParenLoc 
)
inline

Build a new C++ functional-style cast expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2591 of file TreeTransform.h.

◆ RebuildCXXInheritedCtorInitExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXInheritedCtorInitExpr ( QualType  T,
SourceLocation  Loc,
CXXConstructorDecl Constructor,
bool  ConstructsVBase,
bool  InheritedFromVBase 
)
inline

Build a new implicit construction via inherited constructor expression.

Definition at line 2842 of file TreeTransform.h.

◆ RebuildCXXNamedCastExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXNamedCastExpr ( SourceLocation  OpLoc,
Stmt::StmtClass  Class,
SourceLocation  LAngleLoc,
TypeSourceInfo TInfo,
SourceLocation  RAngleLoc,
SourceLocation  LParenLoc,
Expr SubExpr,
SourceLocation  RParenLoc 
)
inline

Build a new C++ "named" cast expression, such as static_cast or reinterpret_cast.

By default, this routine dispatches to one of the more-specific routines for a particular named case, e.g., RebuildCXXStaticCastExpr(). Subclasses may override this routine to provide different behavior.

Definition at line 2484 of file TreeTransform.h.

◆ RebuildCXXNewExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXNewExpr ( SourceLocation  StartLoc,
bool  UseGlobal,
SourceLocation  PlacementLParen,
MultiExprArg  PlacementArgs,
SourceLocation  PlacementRParen,
SourceRange  TypeIdParens,
QualType  AllocatedType,
TypeSourceInfo AllocatedTypeInfo,
Expr ArraySize,
SourceRange  DirectInitRange,
Expr Initializer 
)
inline

Build a new C++ "new" expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2705 of file TreeTransform.h.

◆ RebuildCXXNoexceptExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXNoexceptExpr ( SourceRange  Range,
Expr Arg 
)
inline

Build a new noexcept expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2928 of file TreeTransform.h.

References clang::Sema::BuildCXXNoexceptExpr(), clang::SourceRange::getBegin(), and clang::SourceRange::getEnd().

◆ RebuildCXXOperatorCallExpr()

template<typename Derived >
ExprResult clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr ( OverloadedOperatorKind  Op,
SourceLocation  OpLoc,
Expr Callee,
Expr First,
Expr Second 
)

Build a new overloaded operator call expression.

By default, performs semantic analysis to build the new expression. The semantic analysis provides the behavior of template instantiation, copying with transformations that turn what looks like an overloaded operator call into a use of a builtin operator, performing argument-dependent lookup, etc. Subclasses may override this routine to provide different behavior.

Definition at line 12575 of file TreeTransform.h.

References clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::append(), clang::DeclarationNameLoc::CXXOpName::BeginOpNameLoc, clang::DeclarationNameLoc::CXXOperatorName, clang::DeclarationNameLoc::CXXOpName::EndOpNameLoc, clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::SourceLocation::getFromRawEncoding(), clang::Stmt::getLocStart(), clang::Expr::getObjectKind(), clang::UnaryOperator::getOverloadedOpcode(), clang::BinaryOperator::getOverloadedOpcode(), clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), clang::BinaryOperator::isAssignmentOp(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isOverloadableType(), and clang::OK_ObjCProperty.

◆ RebuildCXXPseudoDestructorExpr()

template<typename Derived >
ExprResult clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr ( Expr Base,
SourceLocation  OperatorLoc,
bool  isArrow,
CXXScopeSpec SS,
TypeSourceInfo ScopeType,
SourceLocation  CCLoc,
SourceLocation  TildeLoc,
PseudoDestructorTypeStorage  Destroyed 
)

Build a new pseudo-destructor expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 12699 of file TreeTransform.h.

References clang::Type::getAs(), clang::PseudoDestructorTypeStorage::getIdentifier(), clang::PointerType::getPointeeType(), clang::Expr::getType(), clang::PseudoDestructorTypeStorage::getTypeSourceInfo(), and clang::Expr::isTypeDependent().

◆ RebuildCXXReinterpretCastExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXReinterpretCastExpr ( SourceLocation  OpLoc,
SourceLocation  LAngleLoc,
TypeSourceInfo TInfo,
SourceLocation  RAngleLoc,
SourceLocation  LParenLoc,
Expr SubExpr,
SourceLocation  RParenLoc 
)
inline

Build a new C++ reinterpret_cast expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2557 of file TreeTransform.h.

◆ RebuildCXXScalarValueInitExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXScalarValueInitExpr ( TypeSourceInfo TSInfo,
SourceLocation  LParenLoc,
SourceLocation  RParenLoc 
)
inline

Build a new C++ zero-initialization expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2694 of file TreeTransform.h.

◆ RebuildCXXStaticCastExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXStaticCastExpr ( SourceLocation  OpLoc,
SourceLocation  LAngleLoc,
TypeSourceInfo TInfo,
SourceLocation  RAngleLoc,
SourceLocation  LParenLoc,
Expr SubExpr,
SourceLocation  RParenLoc 
)
inline

Build a new C++ static_cast expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2523 of file TreeTransform.h.

◆ RebuildCXXTemporaryObjectExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXTemporaryObjectExpr ( TypeSourceInfo TSInfo,
SourceLocation  LParenLoc,
MultiExprArg  Args,
SourceLocation  RParenLoc 
)
inline

Build a new object-construction expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2854 of file TreeTransform.h.

◆ RebuildCXXThisExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXThisExpr ( SourceLocation  ThisLoc,
QualType  ThisType,
bool  isImplicit 
)
inline

Build a new C++ "this" expression.

By default, builds a new "this" expression without performing any semantic analysis. Subclasses may override this routine to provide different behavior.

Definition at line 2654 of file TreeTransform.h.

◆ RebuildCXXThrowExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXThrowExpr ( SourceLocation  ThrowLoc,
Expr Sub,
bool  IsThrownVariableInScope 
)
inline

Build a new C++ throw expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2665 of file TreeTransform.h.

◆ RebuildCXXTryStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildCXXTryStmt ( SourceLocation  TryLoc,
Stmt TryBlock,
ArrayRef< Stmt *>  Handlers 
)
inline

Build a new C++ try statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 2004 of file TreeTransform.h.

◆ RebuildCXXTypeidExpr() [1/2]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXTypeidExpr ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
TypeSourceInfo Operand,
SourceLocation  RParenLoc 
)
inline

Build a new C++ typeid(type) expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2604 of file TreeTransform.h.

◆ RebuildCXXTypeidExpr() [2/2]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXTypeidExpr ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
Expr Operand,
SourceLocation  RParenLoc 
)
inline

Build a new C++ typeid(expr) expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2617 of file TreeTransform.h.

◆ RebuildCXXUnresolvedConstructExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXUnresolvedConstructExpr ( TypeSourceInfo TSInfo,
SourceLocation  LParenLoc,
MultiExprArg  Args,
SourceLocation  RParenLoc 
)
inline

Build a new object-construction expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2868 of file TreeTransform.h.

◆ RebuildCXXUuidofExpr() [1/2]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXUuidofExpr ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
TypeSourceInfo Operand,
SourceLocation  RParenLoc 
)
inline

Build a new C++ __uuidof(type) expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2629 of file TreeTransform.h.

◆ RebuildCXXUuidofExpr() [2/2]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildCXXUuidofExpr ( QualType  TypeInfoType,
SourceLocation  TypeidLoc,
Expr Operand,
SourceLocation  RParenLoc 
)
inline

Build a new C++ __uuidof(expr) expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2641 of file TreeTransform.h.

◆ RebuildDeclarationNameExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildDeclarationNameExpr ( const CXXScopeSpec SS,
LookupResult R,
bool  RequiresADL 
)
inline

Build a new expression that references a declaration.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2091 of file TreeTransform.h.

◆ RebuildDeclRefExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildDeclRefExpr ( NestedNameSpecifierLoc  QualifierLoc,
ValueDecl VD,
const DeclarationNameInfo NameInfo,
TemplateArgumentListInfo TemplateArgs 
)
inline

Build a new expression that references a declaration.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2102 of file TreeTransform.h.

References clang::CXXScopeSpec::Adopt().

◆ RebuildDeclStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildDeclStmt ( MutableArrayRef< Decl *>  Decls,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)
inline

Build a new declaration statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1336 of file TreeTransform.h.

◆ RebuildDecltypeType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildDecltypeType ( Expr Underlying,
SourceLocation  Loc 
)

Build a new C++11 decltype type.

By default, performs semantic analysis when building the decltype type. Subclasses may override this routine to provide different behavior.

Definition at line 12489 of file TreeTransform.h.

◆ RebuildDeducedTemplateSpecializationType()

template<typename Derived>
QualType clang::TreeTransform< Derived >::RebuildDeducedTemplateSpecializationType ( TemplateName  Template,
QualType  Deduced 
)
inline

By default, builds a new DeducedTemplateSpecializationType with the given deduced type.

Definition at line 915 of file TreeTransform.h.

References clang::Sema::Context, and clang::ASTContext::getDeducedTemplateSpecializationType().

◆ RebuildDefaultStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildDefaultStmt ( SourceLocation  DefaultLoc,
SourceLocation  ColonLoc,
Stmt SubStmt 
)
inline

Build a new default statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1218 of file TreeTransform.h.

◆ RebuildDependentAddressSpaceType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildDependentAddressSpaceType ( QualType  PointeeType,
Expr AddrSpaceExpr,
SourceLocation  AttributeLoc 
)

Build a new DependentAddressSpaceType or return the pointee type variable with the correct address space (retrieved from AddrSpaceExpr) applied to it.

The former will be returned in cases where the address space remains dependent.

By default, performs semantic analysis when building the type with address space applied. Subclasses may override this routine to provide different behavior.

Definition at line 12374 of file TreeTransform.h.

◆ RebuildDependentCoawaitExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildDependentCoawaitExpr ( SourceLocation  CoawaitLoc,
Expr Result,
UnresolvedLookupExpr Lookup 
)
inline

Build a new co_await expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 1396 of file TreeTransform.h.

◆ RebuildDependentNameType()

template<typename Derived>
QualType clang::TreeTransform< Derived >::RebuildDependentNameType ( ElaboratedTypeKeyword  Keyword,
SourceLocation  KeywordLoc,
NestedNameSpecifierLoc  QualifierLoc,
const IdentifierInfo Id,
SourceLocation  IdLoc,
bool  DeducedTSTContext 
)
inline

Build a new typename type that refers to an identifier.

By default, performs semantic analysis when building the typename type (or elaborated type). Subclasses may override this routine to provide different behavior.

Definition at line 1001 of file TreeTransform.h.

References clang::CXXScopeSpec::Adopt(), clang::LookupResult::Ambiguous, clang::Sema::CheckTypenameType(), clang::Sema::computeDeclContext(), clang::Sema::Context, clang::Sema::Diag(), clang::ETK_None, clang::ETK_Typename, clang::LookupResult::Found, clang::LookupResult::FoundOverloaded, clang::LookupResult::FoundUnresolvedValue, clang::LookupResult::getAsSingle(), clang::NestedNameSpecifier::getAsType(), clang::Type::getContainedDeducedType(), clang::ASTContext::getDependentNameType(), clang::ASTContext::getElaboratedType(), clang::Decl::getLocation(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), clang::Sema::getNonTagTypeDeclKind(), clang::LookupResult::getRepresentativeDecl(), clang::LookupResult::getResultKind(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::TypeWithKeyword::getTagTypeKindForKeyword(), clang::Sema::getTemplateNameKindForDiagnostics(), clang::ASTContext::getTypeDeclType(), Id, clang::Sema::isAcceptableTagRedeclaration(), clang::NestedNameSpecifier::isDependent(), clang::QualType::isNull(), clang::Sema::LookupQualifiedName(), clang::Sema::LookupTagName, clang::LookupResult::NotFound, clang::LookupResult::NotFoundInCurrentInstantiation, clang::Sema::RequireCompleteDeclContext(), and clang::T.

◆ RebuildDependentScopeDeclRefExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildDependentScopeDeclRefExpr ( NestedNameSpecifierLoc  QualifierLoc,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo NameInfo,
const TemplateArgumentListInfo TemplateArgs,
bool  IsAddressOfOperand,
TypeSourceInfo **  RecoveryTSI 
)
inline

Build a new (previously unresolved) declaration reference expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2779 of file TreeTransform.h.

References clang::CXXScopeSpec::Adopt(), and clang::SourceLocation::isValid().

◆ RebuildDependentSizedArrayType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildDependentSizedArrayType ( QualType  ElementType,
ArrayType::ArraySizeModifier  SizeMod,
Expr SizeExpr,
unsigned  IndexTypeQuals,
SourceRange  BracketsRange 
)

Build a new dependent-sized array type given the element type, size modifier, size expression, and index type qualifiers.

By default, performs semantic analysis when building the array type. Subclasses may override this routine to provide different behavior.

Definition at line 12363 of file TreeTransform.h.

◆ RebuildDependentSizedExtVectorType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildDependentSizedExtVectorType ( QualType  ElementType,
Expr SizeExpr,
SourceLocation  AttributeLoc 
)

Build a new potentially dependently-sized extended vector type given the element type and number of elements.

By default, performs semantic analysis when building the vector type. Subclasses may override this routine to provide different behavior.

Definition at line 12403 of file TreeTransform.h.

◆ RebuildDependentTemplateSpecializationType()

template<typename Derived>
QualType clang::TreeTransform< Derived >::RebuildDependentTemplateSpecializationType ( ElaboratedTypeKeyword  Keyword,
NestedNameSpecifierLoc  QualifierLoc,
const IdentifierInfo Name,
SourceLocation  NameLoc,
TemplateArgumentListInfo Args,
bool  AllowInjectedClassName 
)
inline

Build a new typename type that refers to a template-id.

By default, builds a new DependentNameType type from the nested-name-specifier and the given type. Subclasses may override this routine to provide different behavior.

Definition at line 957 of file TreeTransform.h.

References clang::CXXScopeSpec::Adopt(), clang::Sema::Context, clang::TemplateName::getAsDependentTemplateName(), clang::ASTContext::getDependentTemplateSpecializationType(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), and clang::TemplateName::isNull().

◆ RebuildDesignatedInitExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildDesignatedInitExpr ( Designation Desig,
MultiExprArg  ArrayExprs,
SourceLocation  EqualOrColonLoc,
bool  GNUSyntax,
Expr Init 
)
inline

Build a new designated initializer expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2373 of file TreeTransform.h.

References clang::Sema::ActOnDesignatedInitializer(), clang::ExprError(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

◆ RebuildDoStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildDoStmt ( SourceLocation  DoLoc,
Stmt Body,
SourceLocation  WhileLoc,
SourceLocation  LParenLoc,
Expr Cond,
SourceLocation  RParenLoc 
)
inline

Build a new do-while statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1286 of file TreeTransform.h.

◆ RebuildElaboratedType()

template<typename Derived>
QualType clang::TreeTransform< Derived >::RebuildElaboratedType ( SourceLocation  KeywordLoc,
ElaboratedTypeKeyword  Keyword,
NestedNameSpecifierLoc  QualifierLoc,
QualType  Named 
)
inline

Build a new qualified name type.

By default, builds a new ElaboratedType type from the keyword, the nested-name-specifier and the named type. Subclasses may override this routine to provide different behavior.

Definition at line 943 of file TreeTransform.h.

References clang::Sema::Context, clang::ASTContext::getElaboratedType(), and clang::NestedNameSpecifierLoc::getNestedNameSpecifier().

◆ RebuildEmptyCXXFoldExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildEmptyCXXFoldExpr ( SourceLocation  EllipsisLoc,
BinaryOperatorKind  Operator 
)
inline

Build an empty C++1z fold-expression with the given operator.

By default, produces the fallback value for the fold-expression, or produce an error if there is no fallback value.

Definition at line 3227 of file TreeTransform.h.

◆ RebuildEnumType()

template<typename Derived>
QualType clang::TreeTransform< Derived >::RebuildEnumType ( EnumDecl Enum)
inline

Build a new Enum type.

Definition at line 876 of file TreeTransform.h.

References clang::Sema::Context, and clang::ASTContext::getTypeDeclType().

◆ RebuildExceptionDecl()

template<typename Derived>
VarDecl* clang::TreeTransform< Derived >::RebuildExceptionDecl ( VarDecl ExceptionDecl,
TypeSourceInfo Declarator,
SourceLocation  StartLoc,
SourceLocation  IdLoc,
IdentifierInfo Id 
)
inline

Build a new C++ exception declaration.

By default, performs semantic analysis to build the new decaration. Subclasses may override this routine to provide different behavior.

Definition at line 1977 of file TreeTransform.h.

◆ RebuildExpressionTrait()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildExpressionTrait ( ExpressionTrait  Trait,
SourceLocation  StartLoc,
Expr Queried,
SourceLocation  RParenLoc 
)
inline

Build a new expression trait expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2767 of file TreeTransform.h.

◆ RebuildExtVectorElementExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildExtVectorElementExpr ( Expr Base,
SourceLocation  OpLoc,
SourceLocation  AccessorLoc,
IdentifierInfo Accessor 
)
inline

Build a new extended vector element access expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2333 of file TreeTransform.h.

References clang::Expr::getType().

◆ RebuildExtVectorType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildExtVectorType ( QualType  ElementType,
unsigned  NumElements,
SourceLocation  AttributeLoc 
)

Build a new extended vector type given the element type and number of elements.

By default, performs semantic analysis when building the vector type. Subclasses may override this routine to provide different behavior.

Definition at line 12390 of file TreeTransform.h.

References clang::IntegerLiteral::Create().

◆ RebuildForStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildForStmt ( SourceLocation  ForLoc,
SourceLocation  LParenLoc,
Stmt Init,
Sema::ConditionResult  Cond,
Sema::FullExprArg  Inc,
SourceLocation  RParenLoc,
Stmt Body 
)
inline

Build a new for statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1297 of file TreeTransform.h.

◆ RebuildFunctionNoProtoType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildFunctionNoProtoType ( QualType  ResultType)

Build a new unprototyped function type.

Definition at line 12421 of file TreeTransform.h.

◆ RebuildFunctionProtoType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildFunctionProtoType ( QualType  T,
MutableArrayRef< QualType ParamTypes,
const FunctionProtoType::ExtProtoInfo EPI 
)

Build a new function type.

By default, performs semantic analysis when building the function type. Subclasses may override this routine to provide different behavior.

Definition at line 12410 of file TreeTransform.h.

◆ RebuildGCCAsmStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildGCCAsmStmt ( SourceLocation  AsmLoc,
bool  IsSimple,
bool  IsVolatile,
unsigned  NumOutputs,
unsigned  NumInputs,
IdentifierInfo **  Names,
MultiExprArg  Constraints,
MultiExprArg  Exprs,
Expr AsmString,
MultiExprArg  Clobbers,
SourceLocation  RParenLoc 
)
inline

Build a new inline asm statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1346 of file TreeTransform.h.

◆ RebuildGenericSelectionExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildGenericSelectionExpr ( SourceLocation  KeyLoc,
SourceLocation  DefaultLoc,
SourceLocation  RParenLoc,
Expr ControllingExpr,
ArrayRef< TypeSourceInfo *>  Types,
ArrayRef< Expr *>  Exprs 
)
inline

Build a new generic selection expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2454 of file TreeTransform.h.

◆ RebuildGotoStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildGotoStmt ( SourceLocation  GotoLoc,
SourceLocation  LabelLoc,
LabelDecl Label 
)
inline

Build a new goto statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1309 of file TreeTransform.h.

◆ RebuildIfStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildIfStmt ( SourceLocation  IfLoc,
bool  IsConstexpr,
Sema::ConditionResult  Cond,
Stmt Init,
Stmt Then,
SourceLocation  ElseLoc,
Stmt Else 
)
inline

Build a new "if" statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1248 of file TreeTransform.h.

◆ RebuildImplicitValueInitExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildImplicitValueInitExpr ( QualType  T)
inline

Build a new value-initialized expression.

By default, builds the implicit value initialization without performing any semantic analysis. Subclasses may override this routine to provide different behavior.

Definition at line 2392 of file TreeTransform.h.

References clang::Sema::Context.

◆ RebuildIncompleteArrayType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildIncompleteArrayType ( QualType  ElementType,
ArrayType::ArraySizeModifier  SizeMod,
unsigned  IndexTypeQuals,
SourceRange  BracketsRange 
)

Build a new incomplete array type given the element type, size modifier, and index type qualifiers.

By default, performs semantic analysis when building the array type. Subclasses may override this routine to provide different behavior.

Definition at line 12341 of file TreeTransform.h.

◆ RebuildIndirectGotoStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildIndirectGotoStmt ( SourceLocation  GotoLoc,
SourceLocation  StarLoc,
Expr Target 
)
inline

Build a new indirect goto statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1318 of file TreeTransform.h.

◆ RebuildInitList()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildInitList ( SourceLocation  LBraceLoc,
MultiExprArg  Inits,
SourceLocation  RBraceLoc,
QualType  ResultTy 
)
inline

Build a new initializer list expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2353 of file TreeTransform.h.

References clang::Sema::ActOnInitList(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Type::isDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Expr::setType().

◆ RebuildLabelStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildLabelStmt ( SourceLocation  IdentLoc,
LabelDecl L,
SourceLocation  ColonLoc,
Stmt SubStmt 
)
inline

Build a new label statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1229 of file TreeTransform.h.

References clang::Sema::ActOnLabelStmt().

◆ RebuildMemberExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildMemberExpr ( Expr Base,
SourceLocation  OpLoc,
bool  isArrow,
NestedNameSpecifierLoc  QualifierLoc,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo MemberNameInfo,
ValueDecl Member,
NamedDecl FoundDecl,
const TemplateArgumentListInfo ExplicitTemplateArgs,
NamedDecl FirstQualifierInScope 
)
inline

Build a new member access expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2227 of file TreeTransform.h.

◆ RebuildMemberPointerType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildMemberPointerType ( QualType  PointeeType,
QualType  ClassType,
SourceLocation  Sigil 
)

Build a new member pointer type given the pointee type and the class type it refers into.

By default, performs semantic analysis when building the member pointer type. Subclasses may override this routine to provide different behavior.

Definition at line 12247 of file TreeTransform.h.

◆ RebuildMSAsmStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildMSAsmStmt ( SourceLocation  AsmLoc,
SourceLocation  LBraceLoc,
ArrayRef< Token AsmToks,
StringRef  AsmString,
unsigned  NumOutputs,
unsigned  NumInputs,
ArrayRef< StringRef >  Constraints,
ArrayRef< StringRef >  Clobbers,
ArrayRef< Expr *>  Exprs,
SourceLocation  EndLoc 
)
inline

Build a new MS style inline asm statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1361 of file TreeTransform.h.

◆ RebuildMSDependentExistsStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildMSDependentExistsStmt ( SourceLocation  KeywordLoc,
bool  IsIfExists,
NestedNameSpecifierLoc  QualifierLoc,
DeclarationNameInfo  NameInfo,
Stmt Nested 
)
inline

Build a new C++0x range-based for statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 2047 of file TreeTransform.h.

◆ RebuildObjCArrayLiteral()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCArrayLiteral ( SourceRange  Range,
Expr **  Elements,
unsigned  NumElements 
)
inline

Build a new Objective-C array literal.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2955 of file TreeTransform.h.

◆ RebuildObjCAtCatchStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildObjCAtCatchStmt ( SourceLocation  AtLoc,
SourceLocation  RParenLoc,
VarDecl Var,
Stmt Body 
)
inline

Build a new Objective-C @catch statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1442 of file TreeTransform.h.

◆ RebuildObjCAtFinallyStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildObjCAtFinallyStmt ( SourceLocation  AtLoc,
Stmt Body 
)
inline

Build a new Objective-C @finally statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1454 of file TreeTransform.h.

◆ RebuildObjCAtSynchronizedOperand()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCAtSynchronizedOperand ( SourceLocation  atLoc,
Expr object 
)
inline

Rebuild the operand to an Objective-C @synchronized statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1931 of file TreeTransform.h.

◆ RebuildObjCAtSynchronizedStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildObjCAtSynchronizedStmt ( SourceLocation  AtLoc,
Expr Object,
Stmt Body 
)
inline

Build a new Objective-C @synchronized statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1940 of file TreeTransform.h.

◆ RebuildObjCAtThrowStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildObjCAtThrowStmt ( SourceLocation  AtLoc,
Expr Operand 
)
inline

Build a new Objective-C @throw statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1463 of file TreeTransform.h.

◆ RebuildObjCAtTryStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildObjCAtTryStmt ( SourceLocation  AtLoc,
Stmt TryBody,
MultiStmtArg  CatchStmts,
Stmt Finally 
)
inline

Build a new Objective-C @try statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1418 of file TreeTransform.h.

◆ RebuildObjCAutoreleasePoolStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildObjCAutoreleasePoolStmt ( SourceLocation  AtLoc,
Stmt Body 
)
inline

Build a new Objective-C @autoreleasepool statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1949 of file TreeTransform.h.

◆ RebuildObjCBoxedExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCBoxedExpr ( SourceRange  SR,
Expr ValueExpr 
)
inline

Build a new Objective-C boxed expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2947 of file TreeTransform.h.

◆ RebuildObjCDictionaryLiteral()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCDictionaryLiteral ( SourceRange  Range,
MutableArrayRef< ObjCDictionaryElement Elements 
)
inline

Build a new Objective-C dictionary literal.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2973 of file TreeTransform.h.

◆ RebuildObjCEncodeExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCEncodeExpr ( SourceLocation  AtLoc,
TypeSourceInfo EncodeTypeInfo,
SourceLocation  RParenLoc 
)
inline

Build a new Objective-C @encode expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2982 of file TreeTransform.h.

References clang::Sema::BuildObjCEncodeExpression().

◆ RebuildObjCExceptionDecl()

template<typename Derived>
VarDecl* clang::TreeTransform< Derived >::RebuildObjCExceptionDecl ( VarDecl ExceptionDecl,
TypeSourceInfo TInfo,
QualType  T 
)
inline

Rebuild an Objective-C exception declaration.

By default, performs semantic analysis to build the new declaration. Subclasses may override this routine to provide different behavior.

Definition at line 1430 of file TreeTransform.h.

References clang::NamedDecl::getIdentifier(), clang::DeclaratorDecl::getInnerLocStart(), and clang::Decl::getLocation().

◆ RebuildObjCForCollectionStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildObjCForCollectionStmt ( SourceLocation  ForLoc,
Stmt Element,
Expr Collection,
SourceLocation  RParenLoc,
Stmt Body 
)
inline

Build a new Objective-C fast enumeration statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1958 of file TreeTransform.h.

References clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::StmtError().

◆ RebuildObjCIsaExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCIsaExpr ( Expr BaseArg,
SourceLocation  IsaLoc,
SourceLocation  OpLoc,
bool  IsArrow 
)
inline

Build a new Objective-C "isa" expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 3100 of file TreeTransform.h.

◆ RebuildObjCIvarRefExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCIvarRefExpr ( Expr BaseArg,
ObjCIvarDecl Ivar,
SourceLocation  IvarLoc,
bool  IsArrow,
bool  IsFreeIvar 
)
inline

Build a new Objective-C ivar reference expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 3045 of file TreeTransform.h.

References clang::NamedDecl::getDeclName(), and clang::Expr::getType().

◆ RebuildObjCMessageExpr() [1/3]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCMessageExpr ( TypeSourceInfo ReceiverTypeInfo,
Selector  Sel,
ArrayRef< SourceLocation SelectorLocs,
ObjCMethodDecl Method,
SourceLocation  LBracLoc,
MultiExprArg  Args,
SourceLocation  RBracLoc 
)
inline

Build a new Objective-C class message.

Definition at line 2989 of file TreeTransform.h.

References clang::Sema::BuildClassMessage(), and clang::TypeSourceInfo::getType().

◆ RebuildObjCMessageExpr() [2/3]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCMessageExpr ( Expr Receiver,
Selector  Sel,
ArrayRef< SourceLocation SelectorLocs,
ObjCMethodDecl Method,
SourceLocation  LBracLoc,
MultiExprArg  Args,
SourceLocation  RBracLoc 
)
inline

Build a new Objective-C instance message.

Definition at line 3004 of file TreeTransform.h.

References clang::Sema::BuildInstanceMessage(), and clang::Expr::getType().

◆ RebuildObjCMessageExpr() [3/3]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCMessageExpr ( SourceLocation  SuperLoc,
Selector  Sel,
ArrayRef< SourceLocation SelectorLocs,
QualType  SuperType,
ObjCMethodDecl Method,
SourceLocation  LBracLoc,
MultiExprArg  Args,
SourceLocation  RBracLoc 
)
inline

Build a new Objective-C instance/class message to 'super'.

Definition at line 3019 of file TreeTransform.h.

References clang::Sema::BuildClassMessage(), clang::Sema::BuildInstanceMessage(), and clang::ObjCMethodDecl::isInstanceMethod().

◆ RebuildObjCObjectPointerType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildObjCObjectPointerType ( QualType  PointeeType,
SourceLocation  Star 
)

Build a new Objective-C object pointer type given the pointee type.

By default, directly builds the pointer type, with no additional semantic analysis.

Definition at line 12286 of file TreeTransform.h.

◆ RebuildObjCObjectType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildObjCObjectType ( QualType  BaseType,
SourceLocation  Loc,
SourceLocation  TypeArgsLAngleLoc,
ArrayRef< TypeSourceInfo *>  TypeArgs,
SourceLocation  TypeArgsRAngleLoc,
SourceLocation  ProtocolLAngleLoc,
ArrayRef< ObjCProtocolDecl *>  Protocols,
ArrayRef< SourceLocation ProtocolLocs,
SourceLocation  ProtocolRAngleLoc 
)

Build an Objective-C object type.

By default, performs semantic analysis when building the object type. Subclasses may override this routine to provide different behavior.

Definition at line 12268 of file TreeTransform.h.

◆ RebuildObjCPropertyRefExpr() [1/2]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCPropertyRefExpr ( Expr BaseArg,
ObjCPropertyDecl Property,
SourceLocation  PropertyLoc 
)
inline

Build a new Objective-C property reference expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 3065 of file TreeTransform.h.

References clang::NamedDecl::getDeclName(), and clang::Expr::getType().

◆ RebuildObjCPropertyRefExpr() [2/2]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCPropertyRefExpr ( Expr Base,
QualType  T,
ObjCMethodDecl Getter,
ObjCMethodDecl Setter,
SourceLocation  PropertyLoc 
)
inline

Build a new Objective-C property reference expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 3084 of file TreeTransform.h.

◆ RebuildObjCSubscriptRefExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildObjCSubscriptRefExpr ( SourceLocation  RB,
Expr Base,
Expr Key,
ObjCMethodDecl getterMethod,
ObjCMethodDecl setterMethod 
)
inline

Definition at line 2961 of file TreeTransform.h.

◆ RebuildObjCTypeParamType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildObjCTypeParamType ( const ObjCTypeParamDecl Decl,
SourceLocation  ProtocolLAngleLoc,
ArrayRef< ObjCProtocolDecl *>  Protocols,
ArrayRef< SourceLocation ProtocolLocs,
SourceLocation  ProtocolRAngleLoc 
)

Definition at line 12255 of file TreeTransform.h.

◆ RebuildOffsetOfExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildOffsetOfExpr ( SourceLocation  OperatorLoc,
TypeSourceInfo Type,
ArrayRef< Sema::OffsetOfComponent Components,
SourceLocation  RParenLoc 
)
inline

Build a new builtin offsetof expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2150 of file TreeTransform.h.

◆ RebuildOMPAlignedClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPAlignedClause ( ArrayRef< Expr *>  VarList,
Expr Alignment,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'aligned' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1717 of file TreeTransform.h.

◆ RebuildOMPArraySectionExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildOMPArraySectionExpr ( Expr Base,
SourceLocation  LBracketLoc,
Expr LowerBound,
SourceLocation  ColonLoc,
Expr Length,
SourceLocation  RBracketLoc 
)
inline

Build a new array section expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2203 of file TreeTransform.h.

◆ RebuildOMPCollapseClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPCollapseClause ( Expr Num,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'collapse' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1544 of file TreeTransform.h.

◆ RebuildOMPCopyinClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPCopyinClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'copyin' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1730 of file TreeTransform.h.

◆ RebuildOMPCopyprivateClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPCopyprivateClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'copyprivate' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1742 of file TreeTransform.h.

◆ RebuildOMPDefaultClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPDefaultClause ( OpenMPDefaultClauseKind  Kind,
SourceLocation  KindKwLoc,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'default' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1555 of file TreeTransform.h.

◆ RebuildOMPDependClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPDependClause ( OpenMPDependClauseKind  DepKind,
SourceLocation  DepLoc,
SourceLocation  ColonLoc,
ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'depend' pseudo clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1767 of file TreeTransform.h.

◆ RebuildOMPDeviceClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPDeviceClause ( Expr Device,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'device' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1779 of file TreeTransform.h.

◆ RebuildOMPDistScheduleClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPDistScheduleClause ( OpenMPDistScheduleClauseKind  Kind,
Expr ChunkSize,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  KindLoc,
SourceLocation  CommaLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'dist_schedule' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1872 of file TreeTransform.h.

◆ RebuildOMPExecutableDirective()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildOMPExecutableDirective ( OpenMPDirectiveKind  Kind,
DeclarationNameInfo  DirName,
OpenMPDirectiveKind  CancelRegion,
ArrayRef< OMPClause *>  Clauses,
Stmt AStmt,
SourceLocation  StartLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP executable directive.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1472 of file TreeTransform.h.

◆ RebuildOMPFinalClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPFinalClause ( Expr Condition,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'final' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1501 of file TreeTransform.h.

◆ RebuildOMPFirstprivateClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPFirstprivateClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'firstprivate' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1617 of file TreeTransform.h.

◆ RebuildOMPFlushClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPFlushClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'flush' pseudo clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1754 of file TreeTransform.h.

◆ RebuildOMPFromClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPFromClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'from' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1895 of file TreeTransform.h.

◆ RebuildOMPGrainsizeClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPGrainsizeClause ( Expr Grainsize,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'grainsize' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1839 of file TreeTransform.h.

◆ RebuildOMPHintClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPHintClause ( Expr Hint,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'hint' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1861 of file TreeTransform.h.

◆ RebuildOMPIfClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPIfClause ( OpenMPDirectiveKind  NameModifier,
Expr Condition,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  NameModifierLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'if' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1486 of file TreeTransform.h.

◆ RebuildOMPInReductionClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPInReductionClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
CXXScopeSpec ReductionIdScopeSpec,
const DeclarationNameInfo ReductionId,
ArrayRef< Expr *>  UnresolvedReductions 
)
inline

Build a new OpenMP 'in_reduction' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1686 of file TreeTransform.h.

◆ RebuildOMPIsDevicePtrClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPIsDevicePtrClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'is_device_ptr' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1919 of file TreeTransform.h.

◆ RebuildOMPLastprivateClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPLastprivateClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'lastprivate' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1629 of file TreeTransform.h.

◆ RebuildOMPLinearClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPLinearClause ( ArrayRef< Expr *>  VarList,
Expr Step,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
OpenMPLinearClauseKind  Modifier,
SourceLocation  ModifierLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'linear' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1701 of file TreeTransform.h.

◆ RebuildOMPMapClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPMapClause ( OpenMPMapClauseKind  MapTypeModifier,
OpenMPMapClauseKind  MapType,
bool  IsMapTypeImplicit,
SourceLocation  MapLoc,
SourceLocation  ColonLoc,
ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'map' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1791 of file TreeTransform.h.

◆ RebuildOMPNumTasksClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPNumTasksClause ( Expr NumTasks,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'num_tasks' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1850 of file TreeTransform.h.

◆ RebuildOMPNumTeamsClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPNumTeamsClause ( Expr NumTeams,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'num_teams' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1805 of file TreeTransform.h.

◆ RebuildOMPNumThreadsClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPNumThreadsClause ( Expr NumThreads,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'num_threads' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1512 of file TreeTransform.h.

◆ RebuildOMPOrderedClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPOrderedClause ( SourceLocation  StartLoc,
SourceLocation  EndLoc,
SourceLocation  LParenLoc,
Expr Num 
)
inline

Build a new OpenMP 'ordered' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1595 of file TreeTransform.h.

◆ RebuildOMPPriorityClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPPriorityClause ( Expr Priority,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'priority' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1828 of file TreeTransform.h.

◆ RebuildOMPPrivateClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPPrivateClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'private' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1605 of file TreeTransform.h.

◆ RebuildOMPProcBindClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPProcBindClause ( OpenMPProcBindClauseKind  Kind,
SourceLocation  KindKwLoc,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'proc_bind' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1568 of file TreeTransform.h.

◆ RebuildOMPReductionClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPReductionClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
CXXScopeSpec ReductionIdScopeSpec,
const DeclarationNameInfo ReductionId,
ArrayRef< Expr *>  UnresolvedReductions 
)
inline

Build a new OpenMP 'reduction' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1653 of file TreeTransform.h.

◆ RebuildOMPSafelenClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPSafelenClause ( Expr Len,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'safelen' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1524 of file TreeTransform.h.

◆ RebuildOMPScheduleClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPScheduleClause ( OpenMPScheduleClauseModifier  M1,
OpenMPScheduleClauseModifier  M2,
OpenMPScheduleClauseKind  Kind,
Expr ChunkSize,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  M1Loc,
SourceLocation  M2Loc,
SourceLocation  KindLoc,
SourceLocation  CommaLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'schedule' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1581 of file TreeTransform.h.

◆ RebuildOMPSharedClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPSharedClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'shared' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1641 of file TreeTransform.h.

◆ RebuildOMPSimdlenClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPSimdlenClause ( Expr Len,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'simdlen' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1534 of file TreeTransform.h.

◆ RebuildOMPTaskReductionClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPTaskReductionClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  ColonLoc,
SourceLocation  EndLoc,
CXXScopeSpec ReductionIdScopeSpec,
const DeclarationNameInfo ReductionId,
ArrayRef< Expr *>  UnresolvedReductions 
)
inline

Build a new OpenMP 'task_reduction' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1670 of file TreeTransform.h.

◆ RebuildOMPThreadLimitClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPThreadLimitClause ( Expr ThreadLimit,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'thread_limit' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1816 of file TreeTransform.h.

◆ RebuildOMPToClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPToClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'to' clause.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1884 of file TreeTransform.h.

◆ RebuildOMPUseDevicePtrClause()

template<typename Derived>
OMPClause* clang::TreeTransform< Derived >::RebuildOMPUseDevicePtrClause ( ArrayRef< Expr *>  VarList,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc 
)
inline

Build a new OpenMP 'use_device_ptr' clause.

By default, performs semantic analysis to build the new OpenMP clause. Subclasses may override this routine to provide different behavior.

Definition at line 1907 of file TreeTransform.h.

◆ RebuildPackExpansion() [1/2]

template<typename Derived>
TemplateArgumentLoc clang::TreeTransform< Derived >::RebuildPackExpansion ( TemplateArgumentLoc  Pattern,
SourceLocation  EllipsisLoc,
Optional< unsigned >  NumExpansions 
)
inline

◆ RebuildPackExpansion() [2/2]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildPackExpansion ( Expr Pattern,
SourceLocation  EllipsisLoc,
Optional< unsigned >  NumExpansions 
)
inline

Build a new expression pack expansion.

By default, performs semantic analysis to build a new pack expansion for an expression. Subclasses may override this routine to provide different behavior.

Definition at line 3206 of file TreeTransform.h.

◆ RebuildPackExpansionType()

template<typename Derived>
QualType clang::TreeTransform< Derived >::RebuildPackExpansionType ( QualType  Pattern,
SourceRange  PatternRange,
SourceLocation  EllipsisLoc,
Optional< unsigned >  NumExpansions 
)
inline

Build a new pack expansion type.

By default, builds a new PackExpansionType type from the given pattern. Subclasses may override this routine to provide different behavior.

Definition at line 1113 of file TreeTransform.h.

◆ RebuildParenExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildParenExpr ( Expr SubExpr,
SourceLocation  LParen,
SourceLocation  RParen 
)
inline

Build a new expression in parentheses.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2118 of file TreeTransform.h.

◆ RebuildParenListExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildParenListExpr ( SourceLocation  LParenLoc,
MultiExprArg  SubExprs,
SourceLocation  RParenLoc 
)
inline

Build a new expression list in parentheses.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2412 of file TreeTransform.h.

◆ RebuildParenType()

template<typename Derived>
QualType clang::TreeTransform< Derived >::RebuildParenType ( QualType  InnerType)
inline

Build a new parenthesized type.

By default, builds a new ParenType type from the inner type. Subclasses may override this routine to provide different behavior.

Definition at line 934 of file TreeTransform.h.

References clang::Sema::BuildParenType().

◆ RebuildPipeType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildPipeType ( QualType  ValueType,
SourceLocation  KWLoc,
bool  isReadPipe 
)

Build a new pipe type given its value type.

Definition at line 12516 of file TreeTransform.h.

◆ RebuildPointerType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildPointerType ( QualType  PointeeType,
SourceLocation  Sigil 
)

Build a new pointer type given its pointee type.

By default, performs semantic analysis when building the pointer type. Subclasses may override this routine to provide different behavior.

Definition at line 12223 of file TreeTransform.h.

◆ RebuildPredefinedExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildPredefinedExpr ( SourceLocation  Loc,
PredefinedExpr::IdentType  IT 
)
inline

Build a new predefined expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2082 of file TreeTransform.h.

◆ RebuildQualifiedType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildQualifiedType ( QualType  T,
SourceLocation  Loc,
Qualifiers  Quals 
)

◆ RebuildRecordType()

template<typename Derived>
QualType clang::TreeTransform< Derived >::RebuildRecordType ( RecordDecl Record)
inline

Build a new class/struct/union type.

Definition at line 871 of file TreeTransform.h.

References clang::Sema::Context, and clang::ASTContext::getTypeDeclType().

◆ RebuildReferenceType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildReferenceType ( QualType  ReferentType,
bool  LValue,
SourceLocation  Sigil 
)

Build a new reference type given the type it references.

By default, performs semantic analysis when building the reference type. Subclasses may override this routine to provide different behavior.

Parameters
LValuewhether the type was written with an lvalue sigil or an rvalue sigil.

Definition at line 12238 of file TreeTransform.h.

◆ RebuildReturnStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildReturnStmt ( SourceLocation  ReturnLoc,
Expr Result 
)
inline

Build a new return statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1328 of file TreeTransform.h.

◆ RebuildSEHExceptStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildSEHExceptStmt ( SourceLocation  Loc,
Expr FilterExpr,
Stmt Block 
)
inline

Definition at line 2069 of file TreeTransform.h.

◆ RebuildSEHFinallyStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildSEHFinallyStmt ( SourceLocation  Loc,
Stmt Block 
)
inline

Definition at line 2074 of file TreeTransform.h.

References clang::SEHFinallyStmt::Create().

◆ RebuildSEHTryStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildSEHTryStmt ( bool  IsCXXTry,
SourceLocation  TryLoc,
Stmt TryBlock,
Stmt Handler 
)
inline

Definition at line 2064 of file TreeTransform.h.

◆ RebuildShuffleVectorExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildShuffleVectorExpr ( SourceLocation  BuiltinLoc,
MultiExprArg  SubExprs,
SourceLocation  RParenLoc 
)
inline

◆ RebuildSizeOfPackExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildSizeOfPackExpr ( SourceLocation  OperatorLoc,
NamedDecl Pack,
SourceLocation  PackLoc,
SourceLocation  RParenLoc,
Optional< unsigned >  Length,
ArrayRef< TemplateArgument PartialArgs 
)
inline

Build a new expression to compute the length of a parameter pack.

Definition at line 2933 of file TreeTransform.h.

◆ RebuildStmtExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildStmtExpr ( SourceLocation  LParenLoc,
Stmt SubStmt,
SourceLocation  RParenLoc 
)
inline

Build a new GNU statement expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2432 of file TreeTransform.h.

◆ RebuildSwitchStmtBody()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildSwitchStmtBody ( SourceLocation  SwitchLoc,
Stmt Switch,
Stmt Body 
)
inline

Attach the body to the switch statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1268 of file TreeTransform.h.

◆ RebuildSwitchStmtStart()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildSwitchStmtStart ( SourceLocation  SwitchLoc,
Stmt Init,
Sema::ConditionResult  Cond 
)
inline

Start building a new switch statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1259 of file TreeTransform.h.

◆ RebuildTemplateIdExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildTemplateIdExpr ( const CXXScopeSpec SS,
SourceLocation  TemplateKWLoc,
LookupResult R,
bool  RequiresADL,
const TemplateArgumentListInfo TemplateArgs 
)
inline

Build a new template-id expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2801 of file TreeTransform.h.

◆ RebuildTemplateName() [1/4]

template<typename Derived >
TemplateName clang::TreeTransform< Derived >::RebuildTemplateName ( CXXScopeSpec SS,
bool  TemplateKW,
TemplateDecl Template 
)

Build a new template name given a nested name specifier, a flag indicating whether the "template" keyword was provided, and the template that the template name refers to.

By default, builds the new template name directly. Subclasses may override this routine to provide different behavior.

Definition at line 12525 of file TreeTransform.h.

References clang::CXXScopeSpec::getScopeRep().

◆ RebuildTemplateName() [2/4]

template<typename Derived >
TemplateName clang::TreeTransform< Derived >::RebuildTemplateName ( CXXScopeSpec SS,
const IdentifierInfo Name,
SourceLocation  NameLoc,
QualType  ObjectType,
NamedDecl FirstQualifierInScope,
bool  AllowInjectedClassName 
)

Build a new template name given a nested name specifier and the name that is referred to as a template.

By default, performs semantic analysis to determine whether the name can be resolved to a specific template, then builds the appropriate kind of template name. Subclasses may override this routine to provide different behavior.

Definition at line 12534 of file TreeTransform.h.

◆ RebuildTemplateName() [3/4]

template<typename Derived >
TemplateName clang::TreeTransform< Derived >::RebuildTemplateName ( CXXScopeSpec SS,
OverloadedOperatorKind  Operator,
SourceLocation  NameLoc,
QualType  ObjectType,
bool  AllowInjectedClassName 
)

Build a new template name given a nested name specifier and the overloaded operator name that is referred to as a template.

By default, performs semantic analysis to determine whether the name can be resolved to a specific template, then builds the appropriate kind of template name. Subclasses may override this routine to provide different behavior.

Definition at line 12554 of file TreeTransform.h.

◆ RebuildTemplateName() [4/4]

template<typename Derived>
TemplateName clang::TreeTransform< Derived >::RebuildTemplateName ( TemplateTemplateParmDecl Param,
const TemplateArgument ArgPack 
)
inline

Build a new template name given a template template parameter pack and the.

By default, performs semantic analysis to determine whether the name can be resolved to a specific template, then builds the appropriate kind of template name. Subclasses may override this routine to provide different behavior.

Definition at line 1175 of file TreeTransform.h.

◆ RebuildTemplateSpecializationType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildTemplateSpecializationType ( TemplateName  Template,
SourceLocation  TemplateLoc,
TemplateArgumentListInfo Args 
)

Build a new template specialization type.

By default, performs semantic analysis when building the template specialization type. Subclasses may override this routine to provide different behavior.

Definition at line 12502 of file TreeTransform.h.

◆ RebuildTypedefType()

template<typename Derived>
QualType clang::TreeTransform< Derived >::RebuildTypedefType ( TypedefNameDecl Typedef)
inline

Build a new typedef type.

Definition at line 866 of file TreeTransform.h.

References clang::Sema::Context, and clang::ASTContext::getTypeDeclType().

◆ RebuildTypeOfExprType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildTypeOfExprType ( Expr Underlying,
SourceLocation  Loc 
)

Build a new typeof(expr) type.

By default, performs semantic analysis when building the typeof type. Subclasses may override this routine to provide different behavior.

Definition at line 12478 of file TreeTransform.h.

◆ RebuildTypeOfType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildTypeOfType ( QualType  Underlying)

Build a new typeof(type) type.

By default, builds a new TypeOfType with the given underlying type.

Definition at line 12484 of file TreeTransform.h.

◆ RebuildTypeTrait()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildTypeTrait ( TypeTrait  Trait,
SourceLocation  StartLoc,
ArrayRef< TypeSourceInfo *>  Args,
SourceLocation  RParenLoc 
)
inline

Build a new type trait expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2744 of file TreeTransform.h.

◆ RebuildUnaryExprOrTypeTrait() [1/2]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildUnaryExprOrTypeTrait ( TypeSourceInfo TInfo,
SourceLocation  OpLoc,
UnaryExprOrTypeTrait  ExprKind,
SourceRange  R 
)
inline

Build a new sizeof, alignof or vec_step expression with a type argument.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2163 of file TreeTransform.h.

◆ RebuildUnaryExprOrTypeTrait() [2/2]

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildUnaryExprOrTypeTrait ( Expr SubExpr,
SourceLocation  OpLoc,
UnaryExprOrTypeTrait  ExprKind,
SourceRange  R 
)
inline

Build a new sizeof, alignof or vec step expression with an expression argument.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2175 of file TreeTransform.h.

References clang::ExprError(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

◆ RebuildUnaryOperator()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildUnaryOperator ( SourceLocation  OpLoc,
UnaryOperatorKind  Opc,
Expr SubExpr 
)
inline

Build a new unary operator expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2140 of file TreeTransform.h.

◆ RebuildUnaryTransformType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildUnaryTransformType ( QualType  BaseType,
UnaryTransformType::UTTKind  UKind,
SourceLocation  Loc 
)

Build a new unary transform type.

Definition at line 12495 of file TreeTransform.h.

◆ RebuildUnresolvedMemberExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildUnresolvedMemberExpr ( Expr BaseE,
QualType  BaseType,
SourceLocation  OperatorLoc,
bool  IsArrow,
NestedNameSpecifierLoc  QualifierLoc,
SourceLocation  TemplateKWLoc,
NamedDecl FirstQualifierInScope,
LookupResult R,
const TemplateArgumentListInfo TemplateArgs 
)
inline

Build a new member reference expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2906 of file TreeTransform.h.

References clang::CXXScopeSpec::Adopt(), and clang::Sema::BuildMemberReferenceExpr().

◆ RebuildUnresolvedUsingType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildUnresolvedUsingType ( SourceLocation  NameLoc,
Decl D 
)

Rebuild an unresolved typename type, given the decl that the UnresolvedUsingTypenameDecl was transformed to.

Definition at line 12426 of file TreeTransform.h.

References clang::Type::getAs(), clang::NamedDecl::isCXXClassMember(), clang::Decl::isInvalidDecl(), clang::QualType::isNull(), and clang::T.

◆ RebuildVAArgExpr()

template<typename Derived>
ExprResult clang::TreeTransform< Derived >::RebuildVAArgExpr ( SourceLocation  BuiltinLoc,
Expr SubExpr,
TypeSourceInfo TInfo,
SourceLocation  RParenLoc 
)
inline

Build a new va_arg expression.

By default, performs semantic analysis to build the new expression. Subclasses may override this routine to provide different behavior.

Definition at line 2400 of file TreeTransform.h.

◆ RebuildVariableArrayType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildVariableArrayType ( QualType  ElementType,
ArrayType::ArraySizeModifier  SizeMod,
Expr SizeExpr,
unsigned  IndexTypeQuals,
SourceRange  BracketsRange 
)

Build a new variable-length array type given the element type, size modifier, size expression, and index type qualifiers.

By default, performs semantic analysis when building the array type. Subclasses may override this routine to provide different behavior.

Definition at line 12351 of file TreeTransform.h.

◆ RebuildVectorType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::RebuildVectorType ( QualType  ElementType,
unsigned  NumElements,
VectorType::VectorKind  VecKind 
)

Build a new vector type given the element type and number of elements.

By default, performs semantic analysis when building the vector type. Subclasses may override this routine to provide different behavior.

Definition at line 12382 of file TreeTransform.h.

◆ RebuildWhileStmt()

template<typename Derived>
StmtResult clang::TreeTransform< Derived >::RebuildWhileStmt ( SourceLocation  WhileLoc,
Sema::ConditionResult  Cond,
Stmt Body 
)
inline

Build a new while statement.

By default, performs semantic analysis to build the new statement. Subclasses may override this routine to provide different behavior.

Definition at line 1277 of file TreeTransform.h.

◆ RememberPartiallySubstitutedPack()

template<typename Derived>
void clang::TreeTransform< Derived >::RememberPartiallySubstitutedPack ( TemplateArgument  Arg)
inline

"Remember" the partially-substituted pack template argument after performing an instantiation that must preserve the parameter pack use.

This routine is meant to be overridden by the template instantiator.

Definition at line 278 of file TreeTransform.h.

◆ setBase()

template<typename Derived>
void clang::TreeTransform< Derived >::setBase ( SourceLocation  Loc,
DeclarationName  Entity 
)
inline

Sets the "base" location and entity when that information is known based on another transformation.

By default, the source location and entity are ignored. Subclasses can override this function to provide a customized implementation.

Definition at line 172 of file TreeTransform.h.

◆ TransformAddressOfOperand()

template<typename Derived >
ExprResult clang::TreeTransform< Derived >::TransformAddressOfOperand ( Expr E)

The operand of a unary address-of operator has special rules: it's allowed to refer to a non-static member of a class even if there's no 'this' object available.

Definition at line 8994 of file TreeTransform.h.

References clang::ExprError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::UnaryOperator::getOpcode(), clang::UnaryOperator::getOperatorLoc(), clang::UnaryOperator::getSubExpr(), clang::OffsetOfExpr::getTypeSourceInfo(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

◆ TransformAttr()

template<typename Derived >
const Attr * clang::TreeTransform< Derived >::TransformAttr ( const Attr S)

Transform the given attribute.

By default, this routine transforms a statement by delegating to the appropriate TransformXXXAttr function to transform a specific kind of attribute. Subclasses may override this function to transform attributed statements using some other mechanism.

Returns
the transformed attribute

Definition at line 6554 of file TreeTransform.h.

References clang::Attr::getKind().

◆ transformAttrs()

template<typename Derived>
void clang::TreeTransform< Derived >::transformAttrs ( Decl Old,
Decl New 
)
inline

Transform the attributes associated with the given declaration and place them on the new declaration.

By default, this operation does nothing. Subclasses may override this behavior to transform attributes.

Definition at line 438 of file TreeTransform.h.

◆ TransformCompoundStmt()

template<typename Derived >
StmtResult clang::TreeTransform< Derived >::TransformCompoundStmt ( CompoundStmt S,
bool  IsStmtExpr 
)

◆ TransformCondition()

template<typename Derived >
Sema::ConditionResult clang::TreeTransform< Derived >::TransformCondition ( SourceLocation  Loc,
VarDecl Var,
Expr Expr,
Sema::ConditionKind  Kind 
)

Transform the specified condition.

By default, this transforms the variable and expression and rebuilds the condition.

Definition at line 3530 of file TreeTransform.h.

References clang::Sema::ConditionError(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getLocation(), and clang::ActionResult< PtrTy, CompressInvalid >::isInvalid().

◆ TransformCXXNamedCastExpr()

template<typename Derived >
ExprResult clang::TreeTransform< Derived >::TransformCXXNamedCastExpr ( CXXNamedCastExpr E)

◆ TransformDecl()

template<typename Derived>
Decl* clang::TreeTransform< Derived >::TransformDecl ( SourceLocation  Loc,
Decl D 
)
inline

Transform the given declaration, which is referenced from a type or expression.

By default, acts as the identity function on declarations, unless the transformer has had to transform the declaration itself. Subclasses may override this function to provide alternate behavior.

Definition at line 416 of file TreeTransform.h.

◆ TransformDeclarationNameInfo()

template<typename Derived >
DeclarationNameInfo clang::TreeTransform< Derived >::TransformDeclarationNameInfo ( const DeclarationNameInfo NameInfo)

Transform the given declaration name.

By default, transforms the types of conversion function, constructor, and destructor names and then (if needed) rebuilds the declaration name. Identifiers and selectors are returned unmodified. Sublcasses may override this function to provide alternate behavior.

Definition at line 3668 of file TreeTransform.h.

Referenced by clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().

◆ TransformDefinition()

template<typename Derived>
Decl* clang::TreeTransform< Derived >::TransformDefinition ( SourceLocation  Loc,
Decl D 
)
inline

Transform the definition of the given declaration.

By default, invokes TransformDecl() to transform the declaration. Subclasses may override this function to provide alternate behavior.

Definition at line 455 of file TreeTransform.h.

◆ TransformDependentScopeDeclRefExpr()

template<typename Derived >
ExprResult clang::TreeTransform< Derived >::TransformDependentScopeDeclRefExpr ( DependentScopeDeclRefExpr E,
bool  IsAddressOfOperand,
TypeSourceInfo **  RecoveryTSI 
)

◆ TransformDependentTemplateSpecializationType() [1/2]

template<typename Derived >
QualType clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType ( TypeLocBuilder TLB,
DependentTemplateSpecializationTypeLoc  TL,
TemplateName  Template,
CXXScopeSpec SS 
)

FIXME: Wrap this in an elaborated-type-specifier?

Definition at line 5901 of file TreeTransform.h.

References clang::Type::canHaveNullability(), clang::ETK_None, clang::ETK_Typename, clang::Type::getAs(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsTemplateDecl(), clang::AttributedTypeLoc::getAttrEnumOperandLoc(), clang::AttributedTypeLoc::getAttrExprOperand(), clang::AttributedType::getAttrKind(), clang::AttributedTypeLoc::getAttrNameLoc(), clang::AttributedTypeLoc::getAttrOperandParensRange(), clang::TypeLoc::getBeginLoc(), clang::ElaboratedTypeLoc::getElaboratedKeywordLoc(), clang::DependentNameTypeLoc::getElaboratedKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::getElaboratedKeywordLoc(), clang::AttributedType::getEquivalentType(), clang::DependentNameType::getIdentifier(), clang::AttributedType::getImmediateNullability(), clang::ParenTypeLoc::getInnerLoc(), clang::TypeWithKeyword::getKeyword(), clang::DependentTemplateSpecializationTypeLoc::getLAngleLoc(), clang::ParenTypeLoc::getLParenLoc(), clang::AttributedTypeLoc::getModifiedLoc(), clang::AttributedType::getModifiedType(), clang::ElaboratedType::getNamedType(), clang::ElaboratedTypeLoc::getNamedTypeLoc(), clang::DependentNameTypeLoc::getNameLoc(), clang::DependentTemplateSpecializationTypeLoc::getNumArgs(), clang::ElaboratedTypeLoc::getQualifierLoc(), clang::DependentNameTypeLoc::getQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::getQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::getRAngleLoc(), clang::ParenTypeLoc::getRParenLoc(), clang::TypeWithKeyword::getTagTypeKindForKeyword(), clang::DependentTemplateSpecializationTypeLoc::getTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::getTemplateNameLoc(), clang::TypeLoc::getType(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), clang::CXXScopeSpec::getWithLocInContext(), clang::AttributedTypeLoc::hasAttrEnumOperand(), clang::AttributedTypeLoc::hasAttrExprOperand(), clang::AttributedTypeLoc::hasAttrOperand(), clang::QualType::isNull(), clang::Sema::NTK_TypeAliasTemplate, clang::TypeLocBuilder::push(), clang::TypeLocBuilder::pushTypeSpec(), clang::TemplateSpecializationTypeLoc::setArgLocInfo(), clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo(), clang::AttributedTypeLoc::setAttrEnumOperandLoc(), clang::AttributedTypeLoc::setAttrExprOperand(), clang::AttributedTypeLoc::setAttrNameLoc(), clang::AttributedTypeLoc::setAttrOperandParensRange(), clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc(), clang::TemplateArgumentListInfo::setLAngleLoc(), clang::TemplateSpecializationTypeLoc::setLAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc(), clang::ParenTypeLoc::setLParenLoc(), clang::TypeSpecTypeLoc::setNameLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc(), clang::TemplateArgumentListInfo::setRAngleLoc(), clang::TemplateSpecializationTypeLoc::setRAngleLoc(), clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc(), clang::ParenTypeLoc::setRParenLoc(), clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc(), clang::TemplateSpecializationTypeLoc::setTemplateNameLoc(), clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc(), and clang::TemplateArgumentListInfo::size().

◆ TransformDependentTemplateSpecializationType() [2/2]

template<typename Derived >
QualType clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType ( TypeLocBuilder TLB,
DependentTemplateSpecializationTypeLoc  TL,
NestedNameSpecifierLoc  QualifierLoc 
)

◆ transformedLocalDecl()

template<typename Derived>
void clang::TreeTransform< Derived >::transformedLocalDecl ( Decl Old,
Decl New 
)
inline

Note that a local declaration has been transformed by this transformer.

Local declarations are typically transformed via a call to TransformDefinition. However, in some cases (e.g., lambda expressions), the transformer itself has to transform the declarations. This routine can be overridden by a subclass that keeps track of such mappings.

Definition at line 447 of file TreeTransform.h.

◆ TransformExceptionSpec()

template<typename Derived >
bool clang::TreeTransform< Derived >::TransformExceptionSpec ( SourceLocation  Loc,
FunctionProtoType::ExceptionSpecInfo ESI,
SmallVectorImpl< QualType > &  Exceptions,
bool Changed 
)

◆ TransformExpr()

template<typename Derived >
ExprResult clang::TreeTransform< Derived >::TransformExpr ( Expr E)

Transform the given expression.

By default, this routine transforms an expression by delegating to the appropriate TransformXXXExpr function to build a new expression. Subclasses may override this function to transform expressions using some other mechanism.

Returns
the transformed expression.

Definition at line 3319 of file TreeTransform.h.

Referenced by clang::TreeTransform< Derived >::TransformDependentScopeDeclRefExpr().

◆ TransformExprs()

template<typename Derived >
bool clang::TreeTransform< Derived >::TransformExprs ( Expr *const *  Inputs,
unsigned  NumInputs,
bool  IsCall,
SmallVectorImpl< Expr *> &  Outputs,
bool ArgChanged = nullptr 
)

Transform the given list of expressions.

This routine transforms a list of expressions by invoking TransformExpr() for each subexpression. However, it also provides support for variadic templates by expanding any pack expansions (if the derived class permits such expansion) along the way. When pack expansions are present, the number of outputs may not equal the number of inputs.

Parameters
InputsThe set of expressions to be transformed.
NumInputsThe number of expressions in Inputs.
IsCallIf true, then this transform is being performed on function-call arguments, and any arguments that should be dropped, will be.
OutputsThe transformed input expressions will be added to this vector.
ArgChangedIf non-NULL, will be set true if any argument changed due to transformation.
Returns
true if an error occurred, false otherwise.

Definition at line 3417 of file TreeTransform.h.

◆ TransformFirstQualifierInScope()

template<typename Derived>
NamedDecl* clang::TreeTransform< Derived >::TransformFirstQualifierInScope ( NamedDecl D,
SourceLocation  Loc 
)
inline

Transform the given declaration, which was the first part of a nested-name-specifier in a member access expression.

This specific declaration transformation only applies to the first identifier in a nested-name-specifier of a member access expression, e.g., the T in x->T::member

By default, invokes TransformDecl() to transform the declaration. Subclasses may override this function to provide alternate behavior.

Definition at line 468 of file TreeTransform.h.

◆ TransformFunctionProtoType() [1/2]

template<typename Derived >
template<typename Fn >
QualType clang::TreeTransform< Derived >::TransformFunctionProtoType ( TypeLocBuilder TLB,
FunctionProtoTypeLoc  TL,
CXXRecordDecl ThisContext,
unsigned  ThisTypeQuals,
Fn  TransformExceptionSpec 
)

◆ TransformFunctionProtoType() [2/2]

template<typename Derived>
template<typename Derived >
QualType clang::TreeTransform< Derived >::TransformFunctionProtoType ( TypeLocBuilder TLB,
FunctionProtoTypeLoc  TL 
)

◆ TransformFunctionTypeParam()

template<typename Derived >
ParmVarDecl * clang::TreeTransform< Derived >::TransformFunctionTypeParam ( ParmVarDecl OldParm,
int  indexAdjustment,
Optional< unsigned >  NumExpansions,
bool  ExpectParameterPack 
)

◆ TransformFunctionTypeParams()

template<typename Derived >
bool clang::TreeTransform< Derived >::TransformFunctionTypeParams ( SourceLocation  Loc,
ArrayRef< ParmVarDecl *>  Params,
const QualType ParamTypes,
const FunctionProtoType::ExtParameterInfo ParamInfos,
SmallVectorImpl< QualType > &  PTypes,
SmallVectorImpl< ParmVarDecl *> *  PVars,
Sema::ExtParameterInfoBuilder PInfos 
)

Transforms the parameters of a function type into the given vectors.

The result vectors should be kept in sync; null entries in the variables vector are acceptable.

Return true on error.

Definition at line 4948 of file TreeTransform.h.

References clang::TypeLoc::castAs(), clang::PackExpansionTypeLoc::getEllipsisLoc(), clang::PackExpansionType::getNumExpansions(), clang::PackExpansionTypeLoc::getPatternLoc(), and clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr().

◆ TransformInitializer()

template<typename Derived >
ExprResult clang::TreeTransform< Derived >::TransformInitializer ( Expr Init,
bool  NotCopyInit 
)

Transform the given initializer.

By default, this routine transforms an initializer by stripping off the semantic nodes added by initialization, then passing the result to TransformExpr or TransformExprs.

Returns
the transformed initializer.

Definition at line 3336 of file TreeTransform.h.

References clang::ExprEmpty(), clang::ExprError(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), and clang::SourceRange::isInvalid().

◆ TransformNestedNameSpecifierLoc()

template<typename Derived >
NestedNameSpecifierLoc clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc ( NestedNameSpecifierLoc  NNS,
QualType  ObjectType = QualType(),
NamedDecl FirstQualifierInScope = nullptr 
)

Transform the given nested-name-specifier with source-location information.

By default, transforms all of the types and declarations within the nested-name-specifier. Subclasses may override this function to provide alternate behavior.

Definition at line 3556 of file TreeTransform.h.

References clang::CXXScopeSpec::Extend(), clang::TypeLoc::getAs(), clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsNamespace(), clang::NestedNameSpecifier::getAsNamespaceAlias(), clang::NestedNameSpecifier::getAsRecordDecl(), clang::TypeLoc::getBeginLoc(), clang::NestedNameSpecifierLoc::getBeginLoc(), clang::NestedNameSpecifierLoc::getEndLoc(), clang::NestedNameSpecifier::getKind(), clang::NestedNameSpecifierLoc::getLocalBeginLoc(), clang::NestedNameSpecifierLoc::getLocalEndLoc(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), clang::NestedNameSpecifierLoc::getOpaqueData(), clang::NestedNameSpecifierLoc::getPrefix(), clang::CXXScopeSpec::getRange(), clang::CXXScopeSpec::getScopeRep(), clang::TypeLoc::getType(), clang::TypedefTypeLoc::getTypedefNameDecl(), clang::NestedNameSpecifierLoc::getTypeLoc(), clang::CXXScopeSpec::getWithLocInContext(), clang::NestedNameSpecifier::Global, clang::QualType::hasLocalQualifiers(), clang::NestedNameSpecifier::Identifier, clang::Type::isDependentType(), clang::Type::isEnumeralType(), clang::Decl::isInvalidDecl(), clang::Type::isRecordType(), clang::CXXScopeSpec::location_data(), clang::CXXScopeSpec::location_size(), clang::CXXScopeSpec::MakeGlobal(), clang::CXXScopeSpec::MakeSuper(), clang::NestedNameSpecifier::Namespace, clang::NestedNameSpecifier::NamespaceAlias, clang::NestedNameSpecifier::Super, clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), clang::NestedNameSpecifier::TypeSpec, and clang::NestedNameSpecifier::TypeSpecWithTemplate.

◆ TransformOMPClause()

template<typename Derived >
OMPClause * clang::TreeTransform< Derived >::TransformOMPClause ( OMPClause S)

Transform the given statement.

By default, this routine transforms a statement by delegating to the appropriate TransformOMPXXXClause function to transform a specific kind of clause. Subclasses may override this function to transform statements using some other mechanism.

Returns
the transformed OpenMP clause.

Definition at line 3301 of file TreeTransform.h.

◆ TransformOMPExecutableDirective()

template<typename Derived >
StmtResult clang::TreeTransform< Derived >::TransformOMPExecutableDirective ( OMPExecutableDirective S)

Definition at line 7619 of file TreeTransform.h.

References clang::OMPExecutableDirective::clauses().

◆ TransformOverloadExprDecls()

template<typename Derived >
bool clang::TreeTransform< Derived >::TransformOverloadExprDecls ( OverloadExpr Old,
bool  RequiresADL,
LookupResult R 
)

◆ TransformParenDependentScopeDeclRefExpr()

template<typename Derived >
ExprResult clang::TreeTransform< Derived >::TransformParenDependentScopeDeclRefExpr ( ParenExpr PE,
DependentScopeDeclRefExpr DRE,
bool  IsAddressOfOperand,
TypeSourceInfo **  RecoveryTSI 
)

◆ TransformReferenceType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::TransformReferenceType ( TypeLocBuilder TLB,
ReferenceTypeLoc  TL 
)

Transforms a reference type.

Note that somewhat paradoxically we don't care whether the type itself is an l-value type or an r-value type; we only care if the type was written as an l-value type or an r-value type.

Definition at line 4491 of file TreeTransform.h.

References clang::Sema::ConstantEvaluated, clang::Type::getAs(), clang::ArrayTypeLoc::getBracketsRange(), clang::MemberPointerType::getClass(), clang::MemberPointerTypeLoc::getClassTInfo(), clang::ArrayTypeLoc::getElementLoc(), clang::ArrayType::getElementType(), clang::ArrayType::getIndexTypeCVRQualifiers(), clang::ArrayTypeLoc::getLBracketLoc(), clang::PointerLikeTypeLoc< Derived, TypeClass, LocalData >::getPointeeLoc(), clang::MemberPointerType::getPointeeType(), clang::ReferenceType::getPointeeTypeAsWritten(), clang::ArrayTypeLoc::getRBracketLoc(), clang::PointerLikeTypeLoc< Derived, TypeClass, LocalData >::getSigilLoc(), clang::ConstantArrayType::getSize(), clang::ArrayTypeLoc::getSizeExpr(), clang::ArrayType::getSizeModifier(), clang::MemberPointerTypeLoc::getStarLoc(), clang::TypeSourceInfo::getType(), clang::TypeLoc::getType(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), clang::InheritingConcreteTypeLoc< Base, Derived, TypeClass >::getTypePtr(), clang::QualType::isNull(), clang::ReferenceType::isSpelledAsLValue(), clang::TypeLocBuilder::push(), clang::ArrayTypeLoc::setLBracketLoc(), clang::ArrayTypeLoc::setRBracketLoc(), clang::PointerLikeTypeLoc< Derived, TypeClass, LocalData >::setSigilLoc(), clang::ArrayTypeLoc::setSizeExpr(), and clang::TypeLocBuilder::TypeWasModifiedSafely().

◆ TransformSEHHandler()

template<typename Derived >
StmtResult clang::TreeTransform< Derived >::TransformSEHHandler ( Stmt Handler)

Definition at line 7602 of file TreeTransform.h.

◆ TransformStmt()

template<typename Derived >
StmtResult clang::TreeTransform< Derived >::TransformStmt ( Stmt S)

Transform the given statement.

By default, this routine transforms a statement by delegating to the appropriate TransformXXXStmt function to transform a specific kind of statement or the TransformExpr() function to transform an expression. Subclasses may override this function to transform statements using some other mechanism.

Returns
the transformed statement.

Definition at line 3269 of file TreeTransform.h.

◆ TransformTemplateArgument()

template<typename Derived >
bool clang::TreeTransform< Derived >::TransformTemplateArgument ( const TemplateArgumentLoc Input,
TemplateArgumentLoc Output,
bool  Uneval = false 
)

Transform the given template argument.

By default, this operation transforms the type, expression, or declaration stored within the template argument and constructs a new template argument from the transformed result. Subclasses may override this function to provide alternate behavior.

Returns true if there was an error.

Definition at line 3866 of file TreeTransform.h.

◆ TransformTemplateArguments() [1/2]

template<typename Derived>
bool clang::TreeTransform< Derived >::TransformTemplateArguments ( const TemplateArgumentLoc Inputs,
unsigned  NumInputs,
TemplateArgumentListInfo Outputs,
bool  Uneval = false 
)
inline

Transform the given set of template arguments.

By default, this operation transforms all of the template arguments in the input set using TransformTemplateArgument(), and appends the transformed arguments to the output list.

Note that this overload of TransformTemplateArguments() is merely a convenience function. Subclasses that wish to override this behavior should override the iterator-based member template version.

Parameters
InputsThe set of template arguments to be transformed.
NumInputsThe number of template arguments in Inputs.
OutputsThe set of transformed template arguments output by this routine.

Returns true if an error occurred.

Definition at line 553 of file TreeTransform.h.

References clang::Last.

◆ TransformTemplateArguments() [2/2]

template<typename Derived >
template<typename InputIterator >
bool clang::TreeTransform< Derived >::TransformTemplateArguments ( InputIterator  First,
InputIterator  Last,
TemplateArgumentListInfo Outputs,
bool  Uneval = false 
)

Transform the given set of template arguments.

By default, this operation transforms all of the template arguments in the input set using TransformTemplateArgument(), and appends the transformed arguments to the output list.

Parameters
FirstAn iterator to the first template argument.
LastAn iterator one step past the last template argument.
OutputsThe set of transformed template arguments output by this routine.

Returns true if an error occurred.

Definition at line 3997 of file TreeTransform.h.

References clang::TemplateArgumentListInfo::addArgument(), clang::TemplateArgumentLoc::getArgument(), clang::TemplateArgument::getKind(), clang::TemplateArgumentLoc::getSourceRange(), clang::TemplateArgument::isNull(), clang::TemplateArgument::isPackExpansion(), clang::TemplateArgument::Pack, clang::TemplateArgument::pack_begin(), and clang::TemplateArgument::pack_end().

◆ TransformTemplateName()

template<typename Derived >
TemplateName clang::TreeTransform< Derived >::TransformTemplateName ( CXXScopeSpec SS,
TemplateName  Name,
SourceLocation  NameLoc,
QualType  ObjectType = QualType(),
NamedDecl FirstQualifierInScope = nullptr,
bool  AllowInjectedClassName = false 
)

Transform the given template name.

Parameters
SSThe nested-name-specifier that qualifies the template name. This nested-name-specifier must already have been transformed.
NameThe template name to transform.
NameLocThe source location of the template name.
ObjectTypeIf we're translating a template name within a member access expression, this is the type of the object whose member template is being referenced.
FirstQualifierInScopeIf the first part of a nested-name-specifier also refers to a name within the current (lexical) scope, this is the declaration it refers to.

By default, transforms the template name by transforming the declarations and nested-name-specifiers that occur within the template name. Subclasses may override this function to provide alternate behavior.

Definition at line 3731 of file TreeTransform.h.

◆ TransformTemplateParameterList()

template<typename Derived>
TemplateParameterList* clang::TreeTransform< Derived >::TransformTemplateParameterList ( TemplateParameterList TPL)
inline

Definition at line 654 of file TreeTransform.h.

◆ TransformTemplateSpecializationType()

template<typename Derived >
QualType clang::TreeTransform< Derived >::TransformTemplateSpecializationType ( TypeLocBuilder TLB,
TemplateSpecializationTypeLoc  TL,
TemplateName  Template 
)

◆ TransformType() [1/3]

template<typename Derived >
QualType clang::TreeTransform< Derived >::TransformType ( QualType  T)

Transforms the given type into another type.

By default, this routine transforms a type by creating a TypeSourceInfo for it and delegating to the appropriate function. This is expensive, but we don't mind, because this method is deprecated anyway; all users should be switched to storing TypeSourceInfos.

Returns
the transformed type.

Definition at line 4120 of file TreeTransform.h.

References clang::TypeSourceInfo::getType(), and clang::T.

Referenced by clang::TransformTypeSpecType().

◆ TransformType() [2/3]

template<typename Derived >
TypeSourceInfo * clang::TreeTransform< Derived >::TransformType ( TypeSourceInfo DI)

Transforms the given type-with-location into a new type-with-location.

By default, this routine transforms a type by delegating to the appropriate TransformXXXType to build a new type. Subclasses may override this function (to take over all type transformations) or some set of the TransformXXXType functions to alter the transformation.

Definition at line 4138 of file TreeTransform.h.

References clang::TypeLoc::getBeginLoc(), clang::TypeLoc::getFullDataSize(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::QualType::isNull(), and clang::TypeLocBuilder::reserve().

◆ TransformType() [3/3]

template<typename Derived >
QualType clang::TreeTransform< Derived >::TransformType ( TypeLocBuilder TLB,
TypeLoc  TL 
)

Transform the given type-with-location into a new type, collecting location information in the given builder as necessary.

Definition at line 4159 of file TreeTransform.h.

References clang::TypeLoc::getTypeLocClass().

◆ TransformTypeWithDeducedTST() [1/2]

template<typename Derived >
QualType clang::TreeTransform< Derived >::TransformTypeWithDeducedTST ( QualType  T)

Transform a type that is permitted to produce a DeducedTemplateSpecializationType.

This is used in the (relatively rare) contexts where it is acceptable for transformation to produce a class template type with deduced template arguments.

Definition at line 4173 of file TreeTransform.h.

References clang::TypeSourceInfo::getType(), and clang::T.

◆ TransformTypeWithDeducedTST() [2/2]

template<typename Derived >
TypeSourceInfo * clang::TreeTransform< Derived >::TransformTypeWithDeducedTST ( TypeSourceInfo DI)

◆ TryExpandParameterPacks()

template<typename Derived>
bool clang::TreeTransform< Derived >::TryExpandParameterPacks ( SourceLocation  EllipsisLoc,
SourceRange  PatternRange,
ArrayRef< UnexpandedParameterPack Unexpanded,
bool ShouldExpand,
bool RetainExpansion,
Optional< unsigned > &  NumExpansions 
)
inline

Determine whether we should expand a pack expansion with the given set of parameter packs into separate arguments by repeatedly transforming the pattern.

By default, the transformer never tries to expand pack expansions. Subclasses can override this routine to provide different behavior.

Parameters
EllipsisLocThe location of the ellipsis that identifies the pack expansion.
PatternRangeThe source range that covers the entire pattern of the pack expansion.
UnexpandedThe set of unexpanded parameter packs within the pattern.
ShouldExpandWill be set to true if the transformer should expand the corresponding pack expansions into separate arguments. When set, NumExpansions must also be set.
RetainExpansionWhether the caller should add an unexpanded pack expansion after all of the expanded arguments. This is used when extending explicitly-specified template argument packs per C++0x [temp.arg.explicit]p9.
NumExpansionsThe number of separate arguments that will be in the expanded form of the corresponding pack expansion. This is both an input and an output parameter, which can be set by the caller if the number of expansions is known a priori (e.g., due to a prior substitution) and will be set by the callee when the number of expansions is known. The callee must set this value when ShouldExpand is true; it may set this value in other cases.
Returns
true if an error occurred (e.g., because the parameter packs are to be instantiated with arguments of different lengths), false otherwise. If false, ShouldExpand (and possibly NumExpansions) must be set.

Definition at line 254 of file TreeTransform.h.

Member Data Documentation

◆ SemaRef

template<typename Derived>
Sema& clang::TreeTransform< Derived >::SemaRef
protected

Definition at line 115 of file TreeTransform.h.

◆ TransformedLocalDecls

template<typename Derived>
llvm::DenseMap<Decl *, Decl *> clang::TreeTransform< Derived >::TransformedLocalDecls
protected

The set of local declarations that have been transformed, for cases where we are forced to build new declarations within the transformer rather than in the subclass (e.g., lambda closure types).

Definition at line 120 of file TreeTransform.h.


The documentation for this class was generated from the following file: