clang-tools 8.0.0

ReorderFieldsAction.h
Go to the documentation of this file.
1 //===-- tools/extra/clang-reorder-fields/ReorderFieldsAction.h -*- C++ -*-===//
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 /// This file contains the declarations of the ReorderFieldsAction class and
12 /// the FieldPosition struct.
13 ///
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_REORDER_FIELDS_ACTION_H
17 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_REORDER_FIELDS_ACTION_H
18
19 #include "clang/Tooling/Refactoring.h"
20
21 namespace clang {
22 class ASTConsumer;
23
24 namespace reorder_fields {
25
26 class ReorderFieldsAction {
27 llvm::StringRef RecordName;
28 llvm::ArrayRef<std::string> DesiredFieldsOrder;
29 std::map<std::string, tooling::Replacements> &Replacements;
30
31 public:
32 ReorderFieldsAction(
33 llvm::StringRef RecordName,
34 llvm::ArrayRef<std::string> DesiredFieldsOrder,
35 std::map<std::string, tooling::Replacements> &Replacements)
36 : RecordName(RecordName), DesiredFieldsOrder(DesiredFieldsOrder),
37 Replacements(Replacements) {}
38
39 ReorderFieldsAction(const ReorderFieldsAction &) = delete;
40 ReorderFieldsAction &operator=(const ReorderFieldsAction &) = delete;
41
42 std::unique_ptr<ASTConsumer> newASTConsumer();
43 };
44 } // namespace reorder_fields
45 } // namespace clang
46
47 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_REORDER_FIELDS_ACTION_H
clang::reorder_fields::ReorderFieldsAction
Definition: ReorderFieldsAction.h:26
clang::reorder_fields::ReorderFieldsAction::newASTConsumer
std::unique_ptr< ASTConsumer > newASTConsumer()
Definition: ReorderFieldsAction.cpp:305
clang::reorder_fields::ReorderFieldsAction::operator=
ReorderFieldsAction & operator=(const ReorderFieldsAction &)=delete
clang::reorder_fields::ReorderFieldsAction::ReorderFieldsAction
ReorderFieldsAction(llvm::StringRef RecordName, llvm::ArrayRef< std::string > DesiredFieldsOrder, std::map< std::string, tooling::Replacements > &Replacements)
Definition: ReorderFieldsAction.h:32
ASTConsumer
clang
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Definition: ChangeNamespace.cpp:18