1 //===--- RefactoringActions.cpp - Constructs refactoring actions ----------===// 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 #include "clang/Tooling/Refactoring/RefactoringAction.h" 11 12 namespace clang { 13 namespace tooling { 14 15 // Forward declare the individual create*Action functions. 16 #define REFACTORING_ACTION(Name) \ 17 std::unique_ptr<RefactoringAction> create##Name##Action(); 18 #include "clang/Tooling/Refactoring/RefactoringActionRegistry.def" 19 20 std::vector<std::unique_ptr<RefactoringAction>> createRefactoringActions() { 21 std::vector<std::unique_ptr<RefactoringAction>> Actions; 22 23 #define REFACTORING_ACTION(Name) Actions.push_back(create##Name##Action()); 24 #include "clang/Tooling/Refactoring/RefactoringActionRegistry.def" 25 26 return Actions; 27 } 28 29 RefactoringActionRules RefactoringAction::createActiveActionRules() { 30 // FIXME: Filter out rules that are not supported by a particular client. 31 return createActionRules(); 32 } 33 34 } // end namespace tooling 35 } // end namespace clang 36