#include "CodeGenerator.h"


Public Member Functions | |
| void | InsertArg (const CXXThisExpr *stmt) override |
| constexpr | CodeGenerator (OutputFormatHelper &_outputFormatHelper, LambdaStackType &lambdaStack, LambdaInInitCapture lambdaInitCapture, ProcessingPrimaryTemplate processingPrimaryTemplate) |
| ! We do not want to transform a primary template which contains a Coroutine. | |
| constexpr | CodeGenerator (OutputFormatHelper &_outputFormatHelper) |
| constexpr | CodeGenerator (OutputFormatHelper &_outputFormatHelper, LambdaInInitCapture lambdaInitCapture) |
| constexpr | CodeGenerator (OutputFormatHelper &_outputFormatHelper, LambdaStackType &lambdaStack, ProcessingPrimaryTemplate processingPrimaryTemplate) |
| 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 |
| 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. | |
| 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. | |
| void | StartLifetimeScope () |
| void | LifetimeAddExtended (const VarDecl *, const ValueDecl *) |
| void | EndLifetimeScope () |
Public Attributes | |
| bool | mCapturedThisAsCopy {} |
Public Attributes inherited from clang::insights::CodeGenerator | |
| const Decl * | mLastDecl {} |
Additional Inherited Members | |
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. | |
| 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. | |
| void | HandleTemplateParameterPack (const ArrayRef< TemplateArgument > &args) |
| void | HandleCompoundStmt (const CompoundStmt *stmt) |
| void | HandleLocalStaticNonTrivialClass (const VarDecl *stmt) |
| Show what is behind a local static variable. | |
| 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. | |
| void | InsertTemplateArgsObjectParam (const ArrayRef< TemplateArgument > &array) |
| void | InsertTemplateArgsObjectParam (const TemplateParamObjectDecl ¶m) |
| 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. | |
| void | InsertCurlysIfRequired (const Stmt *stmt) |
| Check whether or not this statement will add curlys or parentheses and add them only if required. | |
| 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. | |
| 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 Stmt * | mLastStmt {} |
| const Expr * | mLastExpr {} |
| bool | mProcessingVarDecl {} |
| OutputFormatHelper & | mOutputFormatHelper |
| LambdaStackType | mLambdaStackThis |
| LambdaStackType & | mLambdaStack |
| 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{{}}. | |
| const LambdaExpr * | mLambdaExpr {} |
| std::optional< size_t > | mCurrentVarDeclPos {} |
| std::optional< size_t > | mCurrentCallExprPos {} |
| std::optional< size_t > | mCurrentReturnPos {} |
| std::optional< size_t > | mCurrentFieldPos {} |
| OutputFormatHelper * | mOutputFormatHelperOutside |
| Helper output buffer for std::initializer_list expansion. | |
| bool | mRequiresImplicitReturnZero {} |
| Track whether this is a function with an imlpicit return 0. | |
| 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 {} |
Definition at line 464 of file CodeGenerator.h.
|
inlineexplicitconstexpr |
Definition at line 186 of file CodeGenerator.h.
|
inlineconstexpr |
Definition at line 191 of file CodeGenerator.h.
|
inlineconstexpr |
! We do not want to transform a primary template which contains a Coroutine.
Definition at line 174 of file CodeGenerator.h.
|
inlineconstexpr |
Definition at line 196 of file CodeGenerator.h.
|
override |
Definition at line 5288 of file CodeGenerator.cpp.
References clang::insights::OutputFormatHelper::Append(), kwInternalThis, mCapturedThisAsCopy, and clang::insights::CodeGenerator::mOutputFormatHelper.
|
virtual |
Reimplemented from clang::insights::CodeGenerator.
Definition at line 214 of file CodeGenerator.cpp.
|
virtual |
Reimplemented from clang::insights::CodeGenerator.
Definition at line 215 of file CodeGenerator.cpp.
| bool clang::insights::LambdaCodeGenerator::mCapturedThisAsCopy {} |
Definition at line 472 of file CodeGenerator.h.
Referenced by InsertArg().