Public Member Functions | List of all members
clang::insights::ArrayInitCodeGenerator Class Referencefinal
Inheritance diagram for clang::insights::ArrayInitCodeGenerator:
Inheritance graph
[legend]
Collaboration diagram for clang::insights::ArrayInitCodeGenerator:
Collaboration graph
[legend]

Public Member Functions

 ArrayInitCodeGenerator (OutputFormatHelper &_outputFormatHelper, const uint64_t index)
 
void InsertArg (const ArrayInitIndexExpr *) override
 
virtual void InsertArg (const Decl *stmt)
 
virtual void InsertArg (const Stmt *stmt)
 
- Public Member Functions inherited from clang::insights::CodeGenerator
constexpr CodeGenerator (OutputFormatHelper &_outputFormatHelper)
 
constexpr CodeGenerator (OutputFormatHelper &_outputFormatHelper, LambdaInInitCapture lambdaInitCapture)
 
constexpr CodeGenerator (OutputFormatHelper &_outputFormatHelper, LambdaStackType &lambdaStack, ProcessingPrimaryTemplate processingPrimaryTemplate)
 
virtual ~CodeGenerator ()=default
 
virtual void InsertArg (const Decl *stmt)
 
virtual void InsertArg (const Stmt *stmt)
 
template<typename T >
void InsertTemplateArgs (const T &t)
 
void InsertTemplateArgs (const ClassTemplateSpecializationDecl &clsTemplateSpe)
 
void InsertFunctionNameWithReturnType (const FunctionDecl &decl, const CXXConstructorDecl *cxxInheritedCtorDecl=nullptr)
 Insert the code for a FunctionDecl. More...
 
template<typename T >
void InsertTemplateArgs (const ArrayRef< T > &array)
 
void InsertAttributes (const Decl *)
 
void InsertAttributes (const Decl::attr_range &)
 
void InsertAttribute (const Attr &)
 
void InsertTemplateArg (const TemplateArgument &arg)
 
 STRONG_BOOL (TemplateParamsOnly)
 
void InsertTemplateParameters (const TemplateParameterList &list, const TemplateParamsOnly templateParamsOnly=TemplateParamsOnly::No)
 ! Skip template, type constraints and class/typename. More...
 
void StartLifetimeScope ()
 
void LifetimeAddExtended (const VarDecl *, const ValueDecl *)
 
void EndLifetimeScope ()
 

Additional Inherited Members

- Public Attributes inherited from clang::insights::CodeGenerator
const Decl * mLastDecl {}
 
- Protected Types inherited from clang::insights::CodeGenerator
enum class  LambdaCallerType {
  VarDecl , InitCapture , CallExpr , OperatorCallExpr ,
  MemberCallExpr , LambdaExpr , ReturnStmt , BinaryOperator ,
  CXXMethodDecl , TemplateHead , Decltype
}
 
enum class  BraceKind { Parens , Curlys }
 
using LambdaStackType = StackList< class LambdaHelper >
 
- Protected Member Functions inherited from clang::insights::CodeGenerator
 STRONG_BOOL (LambdaInInitCapture)
 
 STRONG_BOOL (ProcessingPrimaryTemplate)
 
constexpr CodeGenerator (OutputFormatHelper &_outputFormatHelper, LambdaStackType &lambdaStack, LambdaInInitCapture lambdaInitCapture, ProcessingPrimaryTemplate processingPrimaryTemplate)
 ! We do not want to transform a primary template which contains a Coroutine. More...
 
virtual bool InsertVarDecl (const VarDecl *)
 
virtual bool SkipSpaceAfterVarDecl ()
 
virtual bool InsertComma ()
 
virtual bool InsertSemi ()
 
virtual bool InsertNamespace () const
 
virtual bool ShowXValueCasts () const
 Show casts to xvalues independent from the show all casts option. More...
 
void HandleTemplateParameterPack (const ArrayRef< TemplateArgument > &args)
 
void HandleCompoundStmt (const CompoundStmt *stmt)
 
void HandleLocalStaticNonTrivialClass (const VarDecl *stmt)
 Show what is behind a local static variable. More...
 
virtual void FormatCast (const std::string_view castName, const QualType &CastDestType, const Expr *SubExpr, const CastKind &castKind)
 
void ForEachArg (const auto &arguments, auto &&lambda)
 
void InsertArgWithParensIfNeeded (const Stmt *stmt)
 
void InsertSuffix (const QualType &type)
 
void InsertTemplateArg (const TemplateArgumentLoc &arg)
 
bool InsertLambdaStaticInvoker (const CXXMethodDecl *cxxMethodDecl)
 
 STRONG_BOOL (InsertInline)
 
void InsertConceptConstraint (const llvm::SmallVectorImpl< const Expr * > &constraints, const InsertInline insertInline)
 
void InsertConceptConstraint (const FunctionDecl *tmplDecl)
 
void InsertConceptConstraint (const VarDecl *varDecl)
 
void InsertConceptConstraint (const TemplateParameterList &tmplDecl)
 
void InsertTemplate (const FunctionTemplateDecl *, bool withSpec)
 
void InsertQualifierAndNameWithTemplateArgs (const DeclarationName &declName, const auto *stmt)
 
void InsertQualifierAndName (const DeclarationName &declName, const NestedNameSpecifier *qualifier, const bool hasTemplateKeyword)
 
void InsertCXXMethodHeader (const CXXMethodDecl *stmt, OutputFormatHelper &initOutputFormatHelper)
 
void InsertTemplateGuardBegin (const FunctionDecl *stmt)
 
void InsertTemplateGuardEnd (const FunctionDecl *stmt)
 
void InsertTemplateSpecializationHeader (const Decl &)
 Insert template<> to introduce a template specialization. More...
 
void InsertTemplateArgsObjectParam (const ArrayRef< TemplateArgument > &array)
 
void InsertTemplateArgsObjectParam (const TemplateParamObjectDecl &param)
 
void InsertNamespace (const NestedNameSpecifier *namespaceSpecifier)
 
void ParseDeclContext (const DeclContext *Ctx)
 
 STRONG_BOOL (SkipBody)
 
virtual void InsertCXXMethodDecl (const CXXMethodDecl *stmt, SkipBody skipBody)
 
void InsertMethodBody (const FunctionDecl *stmt, const size_t posBeforeFunc)
 
template<typename T >
void InsertConstructorExpr (const T *stmt)
 Generalized function to insert either a CXXConstructExpr or CXXUnresolvedConstructExpr. More...
 
void InsertCurlysIfRequired (const Stmt *stmt)
 Check whether or not this statement will add curlys or parentheses and add them only if required. More...
 
void InsertIfOrSwitchInitVariables (same_as_any_of< const IfStmt, const SwitchStmt > auto *stmt)
 
void InsertInstantiationPoint (const SourceManager &sm, const SourceLocation &instLoc, std::string_view text={})
 Inserts the instantiation point of a template. More...
 
 STRONG_BOOL (AddNewLineAfter)
 
void WrapInCompoundIfNeeded (const Stmt *stmt, const AddNewLineAfter addNewLineAfter)
 
 STRONG_BOOL (AddSpaceAtTheEnd)
 
void WrapInParens (void_func_ref lambda, const AddSpaceAtTheEnd addSpaceAtTheEnd=AddSpaceAtTheEnd::No)
 
void WrapInParensIfNeeded (bool needsParens, void_func_ref lambda, const AddSpaceAtTheEnd addSpaceAtTheEnd=AddSpaceAtTheEnd::No)
 
void WrapInCurliesIfNeeded (bool needsParens, void_func_ref lambda, const AddSpaceAtTheEnd addSpaceAtTheEnd=AddSpaceAtTheEnd::No)
 
void WrapInCurlys (void_func_ref lambda, const AddSpaceAtTheEnd addSpaceAtTheEnd=AddSpaceAtTheEnd::No)
 
void WrapInParensOrCurlys (const BraceKind curlys, void_func_ref lambda, const AddSpaceAtTheEnd addSpaceAtTheEnd=AddSpaceAtTheEnd::No)
 
void UpdateCurrentPos (std::optional< size_t > &pos)
 
void HandleLambdaExpr (const LambdaExpr *stmt, LambdaHelper &lambdaHelper)
 
bool InsideDecltype () const
 
 STRONG_BOOL (SkipVarDecl)
 
 STRONG_BOOL (UseCommaInsteadOfSemi)
 
 STRONG_BOOL (NoEmptyInitList)
 
 STRONG_BOOL (ShowConstantExprValue)
 
- Static Protected Member Functions inherited from clang::insights::CodeGenerator
static std::string_view GetBuiltinTypeSuffix (const BuiltinType::Kind &kind)
 
static std::string FillConstantArray (const ConstantArrayType *ct, const std::string &value, const uint64_t startAt)
 
static std::string GetValueOfValueInit (const QualType &t)
 
- Protected Attributes inherited from clang::insights::CodeGenerator
LifetimeTracker mLifeTimeTracker {}
 
const StmtmLastStmt {}
 
const Expr * mLastExpr {}
 
bool mProcessingVarDecl {}
 
OutputFormatHelpermOutputFormatHelper
 
LambdaStackType mLambdaStackThis
 
LambdaStackTypemLambdaStack
 
LambdaInInitCapture mLambdaInitCapture {LambdaInInitCapture::No}
 
ShowConstantExprValue mShowConstantExprValue {ShowConstantExprValue::No}
 
SkipVarDecl mSkipVarDecl {SkipVarDecl::No}
 
UseCommaInsteadOfSemi mUseCommaInsteadOfSemi {UseCommaInsteadOfSemi::No}
 
NoEmptyInitList mNoEmptyInitList
 At least in case if a requires-clause containing T{} we don't want to get T{{}}. More...
 
const LambdaExpr * mLambdaExpr {}
 
std::optional< size_t > mCurrentVarDeclPos {}
 
std::optional< size_t > mCurrentCallExprPos {}
 
std::optional< size_t > mCurrentReturnPos {}
 
std::optional< size_t > mCurrentFieldPos {}
 
OutputFormatHelpermOutputFormatHelperOutside
 Helper output buffer for std::initializer_list expansion. More...
 
bool mRequiresImplicitReturnZero {}
 Track whether this is a function with an imlpicit return 0. More...
 
bool mSkipSemi {}
 
ProcessingPrimaryTemplate mProcessingPrimaryTemplate {}
 
- Static Protected Attributes inherited from clang::insights::CodeGenerator
static constexpr auto MAX_FILL_VALUES_FOR_ARRAYS
 
static std::map< std::string, bool > mSeenDecls {}
 

Detailed Description

Definition at line 121 of file CodeGenerator.cpp.

Constructor & Destructor Documentation

◆ ArrayInitCodeGenerator()

clang::insights::ArrayInitCodeGenerator::ArrayInitCodeGenerator ( OutputFormatHelper _outputFormatHelper,
const uint64_t  index 
)
inline

Definition at line 126 of file CodeGenerator.cpp.

Member Function Documentation

◆ InsertArg() [1/3]

void clang::insights::ArrayInitCodeGenerator::InsertArg ( const ArrayInitIndexExpr *  )
inlineoverride

Definition at line 133 of file CodeGenerator.cpp.

◆ InsertArg() [2/3]

void clang::insights::CodeGenerator::InsertArg

Definition at line 214 of file CodeGenerator.cpp.

◆ InsertArg() [3/3]

void clang::insights::CodeGenerator::InsertArg

Definition at line 215 of file CodeGenerator.cpp.


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