diff options
Diffstat (limited to 'clang/lib/Tooling/Refactoring/RefactoringActions.cpp')
-rw-r--r-- | clang/lib/Tooling/Refactoring/RefactoringActions.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/clang/lib/Tooling/Refactoring/RefactoringActions.cpp b/clang/lib/Tooling/Refactoring/RefactoringActions.cpp new file mode 100644 index 00000000000..25f055b7270 --- /dev/null +++ b/clang/lib/Tooling/Refactoring/RefactoringActions.cpp @@ -0,0 +1,35 @@ +//===--- RefactoringActions.cpp - Constructs refactoring actions ----------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "clang/Tooling/Refactoring/RefactoringAction.h" + +namespace clang { +namespace tooling { + +// Forward declare the individual create*Action functions. +#define REFACTORING_ACTION(Name) \ + std::unique_ptr<RefactoringAction> create##Name##Action(); +#include "clang/Tooling/Refactoring/RefactoringActionRegistry.def" + +std::vector<std::unique_ptr<RefactoringAction>> createRefactoringActions() { + std::vector<std::unique_ptr<RefactoringAction>> Actions; + +#define REFACTORING_ACTION(Name) Actions.push_back(create##Name##Action()); +#include "clang/Tooling/Refactoring/RefactoringActionRegistry.def" + + return Actions; +} + +RefactoringActionRules RefactoringAction::createActiveActionRules() { + // FIXME: Filter out rules that are not supported by a particular client. + return createActionRules(); +} + +} // end namespace tooling +} // end namespace clang |