clang-tools 20.0.0git
|
This file contains the definition of the ReorderFieldsAction::newASTConsumer method. More...
#include "ReorderFieldsAction.h"
#include "clang/AST/AST.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/Refactoring.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include <string>
Go to the source code of this file.
Namespaces | |
namespace | clang |
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===// | |
namespace | clang::reorder_fields |
Functions | |
static const RecordDecl * | clang::reorder_fields::findDefinition (StringRef RecordName, ASTContext &Context) |
Finds the definition of a record by name. | |
static SmallVector< unsigned, 4 > | clang::reorder_fields::getNewFieldsOrder (const RecordDecl *Definition, ArrayRef< std::string > DesiredFieldsOrder) |
Calculates the new order of fields. | |
static void | clang::reorder_fields::addReplacement (SourceRange Old, SourceRange New, const ASTContext &Context, std::map< std::string, tooling::Replacements > &Replacements) |
Replaces one range of source code by another. | |
static SmallSetVector< FieldDecl *, 1 > | clang::reorder_fields::findMembersUsedInInitExpr (const CXXCtorInitializer *Initializer, ASTContext &Context) |
Find all member fields used in the given init-list initializer expr that belong to the same record. | |
static bool | clang::reorder_fields::reorderFieldsInDefinition (const RecordDecl *Definition, ArrayRef< unsigned > NewFieldsOrder, const ASTContext &Context, std::map< std::string, tooling::Replacements > &Replacements) |
Reorders fields in the definition of a struct/class. | |
static void | clang::reorder_fields::reorderFieldsInConstructor (const CXXConstructorDecl *CtorDecl, ArrayRef< unsigned > NewFieldsOrder, ASTContext &Context, std::map< std::string, tooling::Replacements > &Replacements) |
Reorders initializers in a C++ struct/class constructor. | |
static bool | clang::reorder_fields::reorderFieldsInInitListExpr (const InitListExpr *InitListEx, ArrayRef< unsigned > NewFieldsOrder, const ASTContext &Context, std::map< std::string, tooling::Replacements > &Replacements) |
Reorders initializers in the brace initialization of an aggregate. | |
This file contains the definition of the ReorderFieldsAction::newASTConsumer method.
Definition in file ReorderFieldsAction.cpp.