clang API Documentation
A tool to run refactorings. More...
#include <Refactoring.h>
Public Member Functions | |
RefactoringTool (const CompilationDatabase &Compilations, ArrayRef< std::string > SourcePaths) | |
Replacements & | getReplacements () |
Returns the set of replacements to which replacements should be added during the run of the tool. | |
int | runAndSave (FrontendActionFactory *ActionFactory) |
Call run(), apply all generated replacements, and immediately save the results to disk. | |
bool | applyAllReplacements (Rewriter &Rewrite) |
Apply all stored replacements to the given Rewriter. |
A tool to run refactorings.
This is a refactoring specific version of
Definition at line 37 of file Refactoring.h.
clang::tooling::RefactoringTool::RefactoringTool | ( | const CompilationDatabase & | Compilations, |
ArrayRef< std::string > | SourcePaths | ||
) |
Definition at line 28 of file Refactoring.cpp.
Apply all stored replacements to the given Rewriter.
Replacement applications happen independently of the success of other applications.
Definition at line 55 of file Refactoring.cpp.
Referenced by runAndSave().
Returns the set of replacements to which replacements should be added during the run of the tool.
Definition at line 32 of file Refactoring.cpp.
int clang::tooling::RefactoringTool::runAndSave | ( | FrontendActionFactory * | ActionFactory | ) |
Call run(), apply all generated replacements, and immediately save the results to disk.
Definition at line 34 of file Refactoring.cpp.
References applyAllReplacements(), clang::tooling::ClangTool::getFiles(), and clang::tooling::ClangTool::run().