summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Refactoring/RefactoringActions.cpp
blob: 25f055b7270b870d6b389a10d00216bfc301748e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
OpenPOWER on IntegriCloud