Classes | |
struct | StmtsContainer |
! A helper type to have a container for ArrayRef More... | |
Typedefs | |
using | params_vector = std::vector< std::pair< std::string_view, QualType > > |
using | params_store = std::vector< std::pair< std::string, QualType > > |
Functions | |
DeclStmt * | _mkDeclStmt (std::span< Decl * > decls) |
BinaryOperator * | Assign (const VarDecl *var, Expr *assignExpr) |
static BinaryOperator * | mkBinaryOperator (Expr *lhs, Expr *rhs, BinaryOperator::Opcode opc, QualType resType) |
BinaryOperator * | Assign (UnaryOperator *var, Expr *assignExpr) |
BinaryOperator * | Assign (MemberExpr *me, ValueDecl *field, Expr *assignExpr) |
BinaryOperator * | Assign (DeclRefExpr *declRef, ValueDecl *field, Expr *assignExpr) |
BinaryOperator * | Assign (DeclRefExpr *declRef, Expr *assignExpr) |
BinaryOperator * | Assign (Expr *var, Expr *assignExpr) |
static UnaryOperator * | mkUnaryOperator (const Expr *stmt, UnaryOperatorKind kind, QualType type) |
UnaryOperator * | Not (const Expr *stmt) |
static UnaryOperator * | mkReference (Expr *e, QualType t) |
UnaryOperator * | Ref (const Expr *e) |
UnaryOperator * | Ref (const ValueDecl *d) |
UnaryOperator * | Dref (const Expr *stmt) |
UnaryOperator * | AddrOf (const Expr *stmt) |
CallExpr * | Call (const FunctionDecl *fd, ArrayRef< Expr * > params) |
CallExpr * | Call (MemberExpr *fd, ArrayRef< Expr * > params) |
CallExpr * | Call (std::string_view name, ArrayRef< Expr * > args) |
CXXTryStmt * | Try (const Stmt *tryBody, CXXCatchStmt *catchAllBody) |
CXXCatchStmt * | Catch (ArrayRef< Stmt * > body) |
CXXCatchStmt * | Catch (Stmt *body) |
CXXThrowExpr * | Throw (const Expr *expr) |
UnaryExprOrTypeTraitExpr * | Sizeof (QualType toType) |
CXXStaticCastExpr * | Cast (const Expr *toExpr, QualType toType) |
QualType | Ptr (QualType srcType) |
CanQualType | VoidTy () |
ParenExpr * | Paren (Expr *expr) |
QualType | ContantArrayTy (QualType t, int size) |
static QualType | mkAnonVoidFunctionPointer () |
static FunctionDecl * | CreateFunctionDecl (std::string_view funcName, params_vector params) |
CXXStaticCastExpr * | CastToVoidFunPtr (std::string_view name) |
CXXReinterpretCastExpr * | ReinterpretCast (QualType toType, const Expr *toExpr, bool makePointer) |
CXXStaticCastExpr * | StaticCast (QualType toType, const Expr *toExpr, bool makePointer) |
auto * | mkLabelDecl (std::string_view name) |
LabelStmt * | Label (std::string_view name) |
CompoundStmt * | mkCompoundStmt (ArrayRef< Stmt * > bodyStmts, SourceLocation beginLoc, SourceLocation endLoc) |
IfStmt * | If (const Expr *condition, ArrayRef< Stmt * > bodyStmts) |
IntegerLiteral * | Int32 (uint64_t value) |
MemberExpr * | AccessMember (const Expr *expr, const ValueDecl *vd, bool isArrow) |
BinaryOperator * | Equal (Expr *var, Expr *assignExpr) |
BinaryOperator * | Plus (Expr *var, Expr *assignExpr) |
GotoStmt * | Goto (std::string_view labelName) |
ParmVarDecl * | Parameter (const FunctionDecl *fd, std::string_view name, QualType type) |
static auto * | FunctionBase (std::string_view name, QualType returnType, const params_vector ¶meters, DeclContext *declCtx) |
FunctionDecl * | Function (std::string_view name, QualType returnType, const params_vector ¶meters) |
auto * | mkStdFunctionDecl (std::string_view name, QualType returnType, const params_vector ¶meters) |
DeclRefExpr * | mkDeclRefExpr (const ValueDecl *vd) |
ImplicitCastExpr * | CastLToRValue (const VarDecl *vd) |
CXXMemberCallExpr * | CallMemberFun (Expr *memExpr, QualType retType) |
ReturnStmt * | Return (Expr *stmt) |
ReturnStmt * | Return (const ValueDecl *stmt) |
SwitchStmt * | Switch (Expr *stmt) |
BreakStmt * | Break () |
CaseStmt * | Case (int value, Stmt *stmt) |
VarDecl * | Variable (std::string_view name, QualType type, DeclContext *dc) |
NullStmt * | mkNullStmt () |
Stmt * | Comment (std::string_view comment) |
CXXRecordDecl * | Struct (std::string_view name) |
FieldDecl * | mkFieldDecl (DeclContext *dc, std::string_view name, QualType type) |
InitListExpr * | InitList (ArrayRef< Expr * > initExprs, QualType t) |
ArraySubscriptExpr * | ArraySubscript (const Expr *lhs, uint64_t index, QualType type) |
params_vector | to_params_view (params_store ¶ms) |
DeclRefExpr * | mkVarDeclRefExpr (std::string_view name, QualType type) |
static CallExpr * | CallConstructor (QualType ctorType, DeclRefExpr *lhsDeclRef, Expr *lhsMemberExpr, ArrayRef< Expr * > callParams, DoCast doCast, AsReference asReference) |
CallExpr * | CallConstructor (QualType ctorType, QualType lhsType, const FieldDecl *fieldDecl, ArrayRef< Expr * > callParams, DoCast doCast, AsReference asReference) |
CallExpr * | CallConstructor (QualType ctorType, const VarDecl *varDecl, ArrayRef< Expr * > callParams, DoCast doCast, AsReference asReference) |
CXXBoolLiteralExpr * | Bool (bool b) |
CallExpr * | CallDestructor (const VarDecl *varDecl) |
QualType | Typedef (std::string_view name, QualType underlayingType) |
QualType | GetRecordDeclType (const CXXMethodDecl *md) |
QualType | GetRecordDeclType (const RecordDecl *rd) |
CXXNewExpr * | New (ArrayRef< Expr * > placementArgs, const Expr *expr, QualType t) |
BinaryOperator * | Mul (Expr *lhs, Expr *rhs) |
BinaryOperator * | And (VarDecl *lhs, Expr *rhs) |
void | ReplaceNode (Stmt *parent, Stmt *oldNode, Stmt *newNode) |
SmallVector< Expr *, 5 > | ArgsToExprVector (const Expr *expr) |
STRONG_BOOL (DoCast) | |
STRONG_BOOL (AsReference) | |
template<typename... Dcls> | |
DeclStmt * | mkDeclStmt (Dcls... dcls) |
using clang::insights::asthelpers::params_store = typedef std::vector<std::pair<std::string, QualType> > |
Definition at line 28 of file ASTHelpers.h.
using clang::insights::asthelpers::params_vector = typedef std::vector<std::pair<std::string_view, QualType> > |
Definition at line 27 of file ASTHelpers.h.
DeclStmt* clang::insights::asthelpers::_mkDeclStmt | ( | std::span< Decl * > | decls | ) |
Definition at line 21 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by mkDeclStmt().
MemberExpr * clang::insights::asthelpers::AccessMember | ( | const Expr * | expr, |
const ValueDecl * | vd, | ||
bool | isArrow | ||
) |
Definition at line 318 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::AccessMember(), Assign(), CallConstructor(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), clang::insights::CoroutineASTTransformer::VisitCoroutineBodyStmt(), clang::insights::CoroutineASTTransformer::VisitCXXThisExpr(), and clang::insights::CoroutineASTTransformer::VisitDeclStmt().
UnaryOperator * clang::insights::asthelpers::AddrOf | ( | const Expr * | stmt | ) |
Definition at line 111 of file ASTHelpers.cpp.
References mkUnaryOperator().
Referenced by clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
BinaryOperator * clang::insights::asthelpers::And | ( | VarDecl * | lhs, |
Expr * | rhs | ||
) |
Definition at line 717 of file ASTHelpers.cpp.
References mkBinaryOperator(), and mkDeclRefExpr().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass().
SmallVector< Expr *, 5 > clang::insights::asthelpers::ArgsToExprVector | ( | const Expr * | expr | ) |
Definition at line 740 of file ASTHelpers.cpp.
Referenced by clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl().
ArraySubscriptExpr * clang::insights::asthelpers::ArraySubscript | ( | const Expr * | lhs, |
uint64_t | index, | ||
QualType | type | ||
) |
Definition at line 553 of file ASTHelpers.cpp.
References GetGlobalAST(), and Int32().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::InsertVtblPtr().
BinaryOperator * clang::insights::asthelpers::Assign | ( | const VarDecl * | var, |
Expr * | assignExpr | ||
) |
Definition at line 31 of file ASTHelpers.cpp.
References Assign(), and mkDeclRefExpr().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl(), clang::insights::InsertVtblPtr(), and clang::insights::CoroutineASTTransformer::VisitDeclStmt().
BinaryOperator * clang::insights::asthelpers::Assign | ( | DeclRefExpr * | declRef, |
Expr * | assignExpr | ||
) |
Definition at line 62 of file ASTHelpers.cpp.
References mkBinaryOperator().
BinaryOperator * clang::insights::asthelpers::Assign | ( | DeclRefExpr * | declRef, |
ValueDecl * | field, | ||
Expr * | assignExpr | ||
) |
Definition at line 56 of file ASTHelpers.cpp.
References AccessMember(), and Assign().
BinaryOperator * clang::insights::asthelpers::Assign | ( | Expr * | var, |
Expr * | assignExpr | ||
) |
Definition at line 68 of file ASTHelpers.cpp.
References mkBinaryOperator().
Referenced by Assign().
BinaryOperator * clang::insights::asthelpers::Assign | ( | MemberExpr * | me, |
ValueDecl * | field, | ||
Expr * | assignExpr | ||
) |
Definition at line 50 of file ASTHelpers.cpp.
References mkBinaryOperator().
BinaryOperator * clang::insights::asthelpers::Assign | ( | UnaryOperator * | var, |
Expr * | assignExpr | ||
) |
Definition at line 44 of file ASTHelpers.cpp.
References mkBinaryOperator().
CXXBoolLiteralExpr * clang::insights::asthelpers::Bool | ( | bool | b | ) |
Definition at line 645 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), and clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
BreakStmt * clang::insights::asthelpers::Break | ( | ) |
Definition at line 472 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CoroutinesCodeGenerator::InsertArg().
CallExpr * clang::insights::asthelpers::Call | ( | const FunctionDecl * | fd, |
ArrayRef< Expr * > | params | ||
) |
Definition at line 117 of file ASTHelpers.cpp.
References GetGlobalAST(), and mkDeclRefExpr().
Referenced by clang::insights::CallVecDeleteOrDtor(), clang::insights::CallVecNewOrCtor(), clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl(), and clang::insights::CodeGenerator::InsertMethodBody().
CallExpr * clang::insights::asthelpers::Call | ( | MemberExpr * | fd, |
ArrayRef< Expr * > | params | ||
) |
Definition at line 123 of file ASTHelpers.cpp.
References GetGlobalAST().
CallExpr * clang::insights::asthelpers::Call | ( | std::string_view | name, |
ArrayRef< Expr * > | args | ||
) |
Definition at line 129 of file ASTHelpers.cpp.
References Function(), and VoidTy().
Referenced by CallConstructor().
CallExpr * clang::insights::asthelpers::CallConstructor | ( | QualType | ctorType, |
const VarDecl * | varDecl, | ||
ArrayRef< Expr * > | callParams, | ||
DoCast | doCast, | ||
AsReference | asReference | ||
) |
Definition at line 633 of file ASTHelpers.cpp.
References mkDeclRefExpr().
Referenced by CallConstructor().
|
static |
Definition at line 582 of file ASTHelpers.cpp.
References Call(), CreateFunctionDecl(), clang::insights::details::GetName(), kwInternalThis, Ref(), StaticCast(), and clang::insights::details::StrCat().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl().
CallExpr * clang::insights::asthelpers::CallConstructor | ( | QualType | ctorType, |
QualType | lhsType, | ||
const FieldDecl * | fieldDecl, | ||
ArrayRef< Expr * > | callParams, | ||
DoCast | doCast, | ||
AsReference | asReference | ||
) |
Definition at line 615 of file ASTHelpers.cpp.
References AccessMember(), CallConstructor(), kwInternalThis, and mkVarDeclRefExpr().
CallExpr * clang::insights::asthelpers::CallDestructor | ( | const VarDecl * | varDecl | ) |
Definition at line 652 of file ASTHelpers.cpp.
References CreateFunctionDecl(), clang::insights::details::GetName(), mkDeclRefExpr(), and clang::insights::details::StrCat().
CXXMemberCallExpr * clang::insights::asthelpers::CallMemberFun | ( | Expr * | memExpr, |
QualType | retType | ||
) |
Definition at line 448 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
CaseStmt * clang::insights::asthelpers::Case | ( | int | value, |
Stmt * | stmt | ||
) |
Definition at line 478 of file ASTHelpers.cpp.
References GetGlobalAST(), and Int32().
Referenced by clang::insights::CoroutinesCodeGenerator::InsertArg().
CXXStaticCastExpr * clang::insights::asthelpers::Cast | ( | const Expr * | toExpr, |
QualType | toType | ||
) |
Definition at line 178 of file ASTHelpers.cpp.
References StaticCast().
Referenced by CastToVoidFunPtr(), clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl().
ImplicitCastExpr * clang::insights::asthelpers::CastLToRValue | ( | const VarDecl * | vd | ) |
Definition at line 441 of file ASTHelpers.cpp.
References GetGlobalAST(), and mkDeclRefExpr().
CXXStaticCastExpr * clang::insights::asthelpers::CastToVoidFunPtr | ( | std::string_view | name | ) |
Definition at line 228 of file ASTHelpers.cpp.
References Cast(), CreateFunctionDecl(), mkAnonVoidFunctionPointer(), and mkDeclRefExpr().
Referenced by clang::insights::CallVecDeleteOrDtor(), and clang::insights::CallVecNewOrCtor().
CXXCatchStmt * clang::insights::asthelpers::Catch | ( | ArrayRef< Stmt * > | body | ) |
Definition at line 151 of file ASTHelpers.cpp.
References GetGlobalAST(), and mkCompoundStmt().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), clang::insights::CoroutinesCodeGenerator::InsertArg(), and clang::insights::CodeGenerator::InsertMethodBody().
CXXCatchStmt * clang::insights::asthelpers::Catch | ( | Stmt * | body | ) |
Definition at line 159 of file ASTHelpers.cpp.
Stmt * clang::insights::asthelpers::Comment | ( | std::string_view | comment | ) |
Definition at line 506 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), clang::insights::CoroutinesCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), and clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl().
QualType clang::insights::asthelpers::ContantArrayTy | ( | QualType | t, |
int | size | ||
) |
Definition at line 202 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::CfrontCodeGenerator::CfrontVtableData::VtblArrayVar().
|
static |
Definition at line 222 of file ASTHelpers.cpp.
References Function(), and VoidTy().
Referenced by CallConstructor(), CallDestructor(), and CastToVoidFunPtr().
UnaryOperator * clang::insights::asthelpers::Dref | ( | const Expr * | stmt | ) |
Definition at line 105 of file ASTHelpers.cpp.
References mkUnaryOperator().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
BinaryOperator * clang::insights::asthelpers::Equal | ( | Expr * | var, |
Expr * | assignExpr | ||
) |
Definition at line 330 of file ASTHelpers.cpp.
References GetGlobalAST(), and mkBinaryOperator().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), and clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
FunctionDecl * clang::insights::asthelpers::Function | ( | std::string_view | name, |
QualType | returnType, | ||
const params_vector & | parameters | ||
) |
Definition at line 403 of file ASTHelpers.cpp.
References FunctionBase(), and GetGlobalAST().
Referenced by Call(), clang::insights::CreateCoroFunctionDecl(), CreateFunctionDecl(), clang::insights::EmitGlobalVariableCtors(), clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl(), mkAnonVoidFunctionPointer(), and clang::insights::TemporaryDeclFinder::TemporaryDeclFinder().
|
static |
Definition at line 365 of file ASTHelpers.cpp.
References GetGlobalAST(), and Parameter().
Referenced by Function(), and mkStdFunctionDecl().
QualType clang::insights::asthelpers::GetRecordDeclType | ( | const CXXMethodDecl * | md | ) |
Definition at line 677 of file ASTHelpers.cpp.
Referenced by clang::insights::GetSpecialMemberName(), clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl(), and clang::insights::InsertVtblPtr().
QualType clang::insights::asthelpers::GetRecordDeclType | ( | const RecordDecl * | rd | ) |
Definition at line 683 of file ASTHelpers.cpp.
GotoStmt * clang::insights::asthelpers::Goto | ( | std::string_view | labelName | ) |
Definition at line 342 of file ASTHelpers.cpp.
References GetGlobalAST(), and mkLabelDecl().
Referenced by clang::insights::CoroutinesCodeGenerator::InsertArg(), and clang::insights::ContinueASTTransformer::VisitContinueStmt().
IfStmt * clang::insights::asthelpers::If | ( | const Expr * | condition, |
ArrayRef< Stmt * > | bodyStmts | ||
) |
Definition at line 293 of file ASTHelpers.cpp.
References GetGlobalAST(), and mkCompoundStmt().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), clang::insights::CoroutinesCodeGenerator::InsertArg(), clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
InitListExpr * clang::insights::asthelpers::InitList | ( | ArrayRef< Expr * > | initExprs, |
QualType | t | ||
) |
Definition at line 544 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::EmitGlobalVariableCtors(), and clang::insights::CfrontCodeGenerator::InsertArg().
IntegerLiteral * clang::insights::asthelpers::Int32 | ( | uint64_t | value | ) |
Definition at line 309 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by ArraySubscript(), clang::insights::CallVecDeleteOrDtor(), clang::insights::CallVecNewOrCtor(), Case(), clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
LabelStmt * clang::insights::asthelpers::Label | ( | std::string_view | name | ) |
Definition at line 281 of file ASTHelpers.cpp.
References GetGlobalAST(), and mkLabelDecl().
Referenced by clang::insights::CoroutinesCodeGenerator::InsertArg().
|
static |
Definition at line 212 of file ASTHelpers.cpp.
References Function(), Ptr(), to_params_view(), and VoidTy().
Referenced by CastToVoidFunPtr().
|
static |
Definition at line 37 of file ASTHelpers.cpp.
References GetGlobalAST().
CompoundStmt * clang::insights::asthelpers::mkCompoundStmt | ( | ArrayRef< Stmt * > | bodyStmts, |
SourceLocation | beginLoc, | ||
SourceLocation | endLoc | ||
) |
Definition at line 287 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by Catch(), clang::insights::EmitGlobalVariableCtors(), clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), If(), clang::insights::CoroutinesCodeGenerator::InsertArg(), clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl(), clang::insights::CodeGenerator::InsertMethodBody(), clang::insights::SetFunctionBody(), and clang::insights::CoroutineASTTransformer::VisitCompoundStmt().
DeclRefExpr * clang::insights::asthelpers::mkDeclRefExpr | ( | const ValueDecl * | vd | ) |
Definition at line 425 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by And(), Assign(), Call(), CallConstructor(), CallDestructor(), clang::insights::CallVecCtor(), CastLToRValue(), CastToVoidFunPtr(), clang::insights::EmitGlobalVariableCtors(), clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), clang::insights::InsertVtblPtr(), mkVarDeclRefExpr(), Ref(), Return(), clang::insights::CoroutineASTTransformer::VisitCoawaitExpr(), clang::insights::TemporaryDeclFinder::VisitCXXTemporaryObjectExpr(), and clang::insights::TemporaryDeclFinder::VisitMaterializeTemporaryExpr().
DeclStmt* clang::insights::asthelpers::mkDeclStmt | ( | Dcls... | dcls | ) |
Definition at line 91 of file ASTHelpers.h.
References _mkDeclStmt().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg().
FieldDecl * clang::insights::asthelpers::mkFieldDecl | ( | DeclContext * | dc, |
std::string_view | name, | ||
QualType | type | ||
) |
Definition at line 533 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::AddField(), clang::insights::ProcessFields(), clang::insights::CoroutineASTTransformer::VisitCXXThisExpr(), and clang::insights::CfrontCodeGenerator::CfrontVtableData::VtblPtrField().
auto* clang::insights::asthelpers::mkLabelDecl | ( | std::string_view | name | ) |
Definition at line 273 of file ASTHelpers.cpp.
References GetGlobalAST().
NullStmt * clang::insights::asthelpers::mkNullStmt | ( | ) |
Definition at line 499 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::LifetimeTracker::Return().
|
static |
auto* clang::insights::asthelpers::mkStdFunctionDecl | ( | std::string_view | name, |
QualType | returnType, | ||
const params_vector & | parameters | ||
) |
Definition at line 409 of file ASTHelpers.cpp.
References FunctionBase(), and GetGlobalAST().
|
static |
Definition at line 74 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by AddrOf(), Dref(), mkReference(), and Not().
DeclRefExpr * clang::insights::asthelpers::mkVarDeclRefExpr | ( | std::string_view | name, |
QualType | type | ||
) |
Definition at line 573 of file ASTHelpers.cpp.
References mkDeclRefExpr(), and Variable().
Referenced by clang::insights::AccessMember(), CallConstructor(), clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), and clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl().
BinaryOperator * clang::insights::asthelpers::Mul | ( | Expr * | lhs, |
Expr * | rhs | ||
) |
Definition at line 711 of file ASTHelpers.cpp.
References mkBinaryOperator().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg().
CXXNewExpr * clang::insights::asthelpers::New | ( | ArrayRef< Expr * > | placementArgs, |
const Expr * | expr, | ||
QualType | t | ||
) |
Definition at line 689 of file ASTHelpers.cpp.
References GetGlobalAST(), and Ptr().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), and clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
UnaryOperator * clang::insights::asthelpers::Not | ( | const Expr * | stmt | ) |
Definition at line 81 of file ASTHelpers.cpp.
References mkUnaryOperator().
Referenced by clang::insights::CoroutinesCodeGenerator::InsertArg().
ParmVarDecl * clang::insights::asthelpers::Parameter | ( | const FunctionDecl * | fd, |
std::string_view | name, | ||
QualType | type | ||
) |
Definition at line 348 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by FunctionBase(), and clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
ParenExpr * clang::insights::asthelpers::Paren | ( | Expr * | expr | ) |
Definition at line 196 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg().
BinaryOperator * clang::insights::asthelpers::Plus | ( | Expr * | var, |
Expr * | assignExpr | ||
) |
Definition at line 336 of file ASTHelpers.cpp.
References mkBinaryOperator().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg().
QualType clang::insights::asthelpers::Ptr | ( | QualType | srcType | ) |
Definition at line 184 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl(), clang::insights::InsertVtblPtr(), mkAnonVoidFunctionPointer(), New(), ReinterpretCast(), StaticCast(), clang::insights::CfrontCodeGenerator::CfrontVtableData::VtblArrayVar(), and clang::insights::CfrontCodeGenerator::CfrontVtableData::VtblPtrField().
UnaryOperator * clang::insights::asthelpers::Ref | ( | const Expr * | e | ) |
Definition at line 93 of file ASTHelpers.cpp.
References mkReference().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), and clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl().
UnaryOperator * clang::insights::asthelpers::Ref | ( | const ValueDecl * | d | ) |
Definition at line 99 of file ASTHelpers.cpp.
References mkDeclRefExpr().
Referenced by CallConstructor().
CXXReinterpretCastExpr * clang::insights::asthelpers::ReinterpretCast | ( | QualType | toType, |
const Expr * | toExpr, | ||
bool | makePointer | ||
) |
Definition at line 234 of file ASTHelpers.cpp.
References GetGlobalAST(), and Ptr().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
Definition at line 734 of file ASTHelpers.cpp.
Referenced by clang::insights::CoroutineASTTransformer::VisitCoawaitExpr(), clang::insights::CoroutineASTTransformer::VisitCompoundStmt(), clang::insights::ContinueASTTransformer::VisitContinueStmt(), clang::insights::TemporaryDeclFinder::VisitCXXTemporaryObjectExpr(), clang::insights::CoroutineASTTransformer::VisitCXXThisExpr(), clang::insights::CoroutineASTTransformer::VisitDeclRefExpr(), clang::insights::CoroutineASTTransformer::VisitForStmt(), and clang::insights::TemporaryDeclFinder::VisitMaterializeTemporaryExpr().
ReturnStmt * clang::insights::asthelpers::Return | ( | const ValueDecl * | stmt | ) |
Definition at line 460 of file ASTHelpers.cpp.
References mkDeclRefExpr().
ReturnStmt * clang::insights::asthelpers::Return | ( | Expr * | stmt | ) |
Definition at line 454 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl().
UnaryExprOrTypeTraitExpr * clang::insights::asthelpers::Sizeof | ( | QualType | toType | ) |
Definition at line 171 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CallVecDeleteOrDtor(), clang::insights::CallVecNewOrCtor(), clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), clang::insights::CoroutinesCodeGenerator::InsertArg(), and clang::insights::CfrontCodeGenerator::InsertArg().
CXXStaticCastExpr * clang::insights::asthelpers::StaticCast | ( | QualType | toType, |
const Expr * | toExpr, | ||
bool | makePointer | ||
) |
Definition at line 253 of file ASTHelpers.cpp.
References GetGlobalAST(), and Ptr().
Referenced by CallConstructor(), Cast(), clang::insights::CoroutinesCodeGenerator::InsertArg(), and clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl().
clang::insights::asthelpers::STRONG_BOOL | ( | AsReference | ) |
clang::insights::asthelpers::STRONG_BOOL | ( | DoCast | ) |
CXXRecordDecl * clang::insights::asthelpers::Struct | ( | std::string_view | name | ) |
Definition at line 512 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CfrontCodeGenerator::InsertArg(), and clang::insights::CoroutinesCodeGenerator::InsertCoroutine().
SwitchStmt * clang::insights::asthelpers::Switch | ( | Expr * | stmt | ) |
Definition at line 466 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CoroutinesCodeGenerator::InsertArg().
CXXThrowExpr * clang::insights::asthelpers::Throw | ( | const Expr * | expr | ) |
Definition at line 165 of file ASTHelpers.cpp.
References GetGlobalAST(), and VoidTy().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), and clang::insights::CoroutinesCodeGenerator::InsertArg().
params_vector clang::insights::asthelpers::to_params_view | ( | params_store & | params | ) |
Definition at line 560 of file ASTHelpers.cpp.
Referenced by clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CfrontCodeGenerator::InsertCXXMethodDecl(), and mkAnonVoidFunctionPointer().
CXXTryStmt * clang::insights::asthelpers::Try | ( | const Stmt * | tryBody, |
CXXCatchStmt * | catchAllBody | ||
) |
Definition at line 144 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), clang::insights::CoroutinesCodeGenerator::InsertArg(), and clang::insights::CodeGenerator::InsertMethodBody().
QualType clang::insights::asthelpers::Typedef | ( | std::string_view | name, |
QualType | underlayingType | ||
) |
Definition at line 663 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), and clang::insights::CfrontCodeGenerator::InsertArg().
VarDecl * clang::insights::asthelpers::Variable | ( | std::string_view | name, |
QualType | type, | ||
DeclContext * | dc | ||
) |
Definition at line 487 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by clang::insights::CodeGenerator::HandleLocalStaticNonTrivialClass(), clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), mkVarDeclRefExpr(), clang::insights::TemporaryDeclFinder::TemporaryDeclFinder(), clang::insights::CoroutineASTTransformer::VisitCoawaitExpr(), clang::insights::TemporaryDeclFinder::VisitCXXTemporaryObjectExpr(), clang::insights::TemporaryDeclFinder::VisitMaterializeTemporaryExpr(), and clang::insights::CfrontCodeGenerator::CfrontVtableData::VtblArrayVar().
CanQualType clang::insights::asthelpers::VoidTy | ( | ) |
Definition at line 190 of file ASTHelpers.cpp.
References GetGlobalAST().
Referenced by Call(), clang::insights::CreateCoroFunctionDecl(), CreateFunctionDecl(), clang::insights::EmitGlobalVariableCtors(), clang::insights::CoroutinesCodeGenerator::InsertArg(), clang::insights::CfrontCodeGenerator::InsertArg(), clang::insights::CoroutinesCodeGenerator::InsertCoroutine(), mkAnonVoidFunctionPointer(), clang::insights::TemporaryDeclFinder::TemporaryDeclFinder(), and Throw().