|
clang-tools 23.0.0git
|
Create names for generated variables within a particular statement. More...
#include <LoopConvertUtils.h>
Public Types | |
| enum | NamingStyle { NS_CamelBack , NS_CamelCase , NS_LowerCase , NS_UpperCase } |
Public Member Functions | |
| VariableNamer (StmtGeneratedVarNameMap *GeneratedDecls, const StmtParentMap *ReverseAST, const Stmt *SourceStmt, const VarDecl *OldIndex, const ValueDecl *TheContainer, const ASTContext *Context, NamingStyle Style) | |
| std::string | createIndexName () |
| Generate a new index name. | |
Create names for generated variables within a particular statement.
VariableNamer uses a DeclContext as a reference point, checking for any conflicting declarations higher up in the context or within SourceStmt. It creates a variable name using hints from a source container and the old index, if they exist.
Definition at line 421 of file LoopConvertUtils.h.
| Enumerator | |
|---|---|
| NS_CamelBack | |
| NS_CamelCase | |
| NS_LowerCase | |
| NS_UpperCase | |
Definition at line 424 of file LoopConvertUtils.h.
|
inline |
Definition at line 431 of file LoopConvertUtils.h.
| std::string clang::tidy::modernize::VariableNamer::createIndexName | ( | ) |
Generate a new index name.
Generates the name to be used for an inserted iterator. It relies on declarationExists() to determine that there are no naming conflicts, and tries to use some hints from the container name and the old index name.
Definition at line 838 of file LoopConvertUtils.cpp.
References NS_UpperCase.