clang-tools
4.0.0
|
This file implements a clang-rename tool that automatically finds and renames symbols in C++ code. More...
#include "../RenamingAction.h"
#include "../USRFindingAction.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/Tooling/CommonOptionsParser.h"
#include "clang/Tooling/Refactoring.h"
#include "clang/Tooling/ReplacementsYaml.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdlib>
#include <string>
#include <system_error>
Go to the source code of this file.
Classes | |
struct | RenameAllInfo |
An oldname -> newname rename. More... | |
struct | llvm::yaml::MappingTraits< RenameAllInfo > |
Specialized MappingTraits to describe how a RenameAllInfo is (de)serialized. More... | |
Namespaces | |
llvm | |
llvm::yaml | |
Functions | |
static cl::OptionCategory | ClangRenameOptions ("clang-rename common options") |
static cl::list< unsigned > | SymbolOffsets ("offset", cl::desc("Locates the symbol by offset as opposed to <line>:<column>."), cl::ZeroOrMore, cl::cat(ClangRenameOptions)) |
static cl::opt< bool > | Inplace ("i", cl::desc("Overwrite edited <file>s."), cl::cat(ClangRenameOptions)) |
static cl::list< std::string > | QualifiedNames ("qualified-name", cl::desc("The fully qualified name of the symbol."), cl::ZeroOrMore, cl::cat(ClangRenameOptions)) |
static cl::list< std::string > | NewNames ("new-name", cl::desc("The new name to change the symbol to."), cl::ZeroOrMore, cl::cat(ClangRenameOptions)) |
static cl::opt< bool > | PrintName ("pn", cl::desc("Print the found symbol's name prior to renaming to stderr."), cl::cat(ClangRenameOptions)) |
static cl::opt< bool > | PrintLocations ("pl", cl::desc("Print the locations affected by renaming to stderr."), cl::cat(ClangRenameOptions)) |
static cl::opt< std::string > | ExportFixes ("export-fixes", cl::desc("YAML file to store suggested fixes in."), cl::value_desc("filename"), cl::cat(ClangRenameOptions)) |
static cl::opt< std::string > | Input ("input", cl::desc("YAML file to load oldname-newname pairs from."), cl::Optional, cl::cat(ClangRenameOptions)) |
int | main (int argc, const char **argv) |
This file implements a clang-rename tool that automatically finds and renames symbols in C++ code.
Definition in file ClangRename.cpp.
|
static |
Referenced by main().
|
static |
Referenced by main().
|
static |
Referenced by main().
|
static |
int main | ( | int | argc, |
const char ** | argv | ||
) |
Definition at line 99 of file ClangRename.cpp.
References ClangRenameOptions(), DiagOpts, ExportFixes(), File, Files, Inplace(), Input(), NewNames(), PrevName, PrintLocations(), PrintName(), QualifiedNames(), and SymbolOffsets().
|
static |
|
static |
|
static |
Referenced by main().
|
static |
Referenced by main(), and clang::rename::USRFindingAction::newASTConsumer().
|
static |
Referenced by main(), and clang::rename::USRFindingAction::newASTConsumer().