clang-tools 3.8.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

RenamingAction.h
Go to the documentation of this file.
1 //===--- tools/extra/clang-rename/RenamingAction.h - Clang rename tool ----===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// \brief Provides an action to rename every symbol at a point.
12 ///
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_RENAMING_ACTION_H_
16 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_RENAMING_ACTION_H_
17
18 #include "clang/Tooling/Refactoring.h"
19
20 namespace clang {
21 class ASTConsumer;
22 class CompilerInstance;
23
24 namespace rename {
25
26 class RenamingAction {
27 public:
28 RenamingAction(const std::string &NewName, const std::string &PrevName,
29 const std::vector<std::string> &USRs,
30 tooling::Replacements &Replaces, bool PrintLocations = false)
31 : NewName(NewName), PrevName(PrevName), USRs(USRs), Replaces(Replaces),
32 PrintLocations(PrintLocations) {
33 }
34
35 std::unique_ptr<ASTConsumer> newASTConsumer();
36
37 private:
38 const std::string &NewName, &PrevName;
39 const std::vector<std::string> &USRs;
40 tooling::Replacements &Replaces;
41 bool PrintLocations;
42 };
43
44 }
45 }
46
47 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_RENAMING_ACTION_H_
ASTConsumer
clang::rename::RenamingAction::RenamingAction
RenamingAction(const std::string &NewName, const std::string &PrevName, const std::vector< std::string > &USRs, tooling::Replacements &Replaces, bool PrintLocations=false)
Definition: RenamingAction.h:28
clang::rename::RenamingAction::newASTConsumer
std::unique_ptr< ASTConsumer > newASTConsumer()
Definition: RenamingAction.cpp:84
clang::rename::RenamingAction
Definition: RenamingAction.h:26