clang-tools 8.0.0

Functions | Variables
ClangReorderFields.cpp File Reference

This file contains the implementation of clang-reorder-fields tool. More...

`#include "../ReorderFieldsAction.h"`
`#include "clang/Basic/Diagnostic.h"`
`#include "clang/Basic/DiagnosticOptions.h"`
`#include "clang/Basic/FileManager.h"`
`#include "clang/Basic/LangOptions.h"`
`#include "clang/Basic/SourceManager.h"`
`#include "clang/Frontend/TextDiagnosticPrinter.h"`
`#include "clang/Rewrite/Core/Rewriter.h"`
`#include "clang/Tooling/CommonOptionsParser.h"`
`#include "clang/Tooling/Refactoring.h"`
`#include "clang/Tooling/Tooling.h"`
`#include "llvm/ADT/IntrusiveRefCntPtr.h"`
`#include "llvm/Support/CommandLine.h"`
`#include "llvm/Support/FileSystem.h"`
`#include <cstdlib>`
`#include <string>`
`#include <system_error>`
Include dependency graph for ClangReorderFields.cpp:

Go to the source code of this file.

## Functions
cl::OptionCategory | ClangReorderFieldsCategory ("clang-reorder-fields options")
static cl::opt< std::string > | RecordName ("record-name", cl::Required, cl::desc("The name of the struct/class."), cl::cat(ClangReorderFieldsCategory))
static cl::list< std::string > | FieldsOrder ("fields-order", cl::CommaSeparated, cl::OneOrMore, cl::desc("The desired fields order."), cl::cat(ClangReorderFieldsCategory))
static cl::opt< bool > | Inplace ("i", cl::desc("Overwrite edited files."), cl::cat(ClangReorderFieldsCategory))
int | main (int argc, const char **argv)

## Variables
const char | Usage [] = "A tool to reorder fields in C/C++ structs/classes.\n"

## Detailed Description

This file contains the implementation of clang-reorder-fields tool.

Definition in file ClangReorderFields.cpp.

## Function Documentation

## ◆ ClangReorderFieldsCategory()

cl::OptionCategory ClangReorderFieldsCategory | ( | "clang-reorder-fields options" |  | ) |

Referenced by main().

## ◆ FieldsOrder()

static cl::list<std::string> FieldsOrder | ( | "fields-order" | ,
|  | cl::CommaSeparated | ,
|  | cl::OneOrMore | ,
|  | cl::desc("The desired fields order.") | ,
|  | cl::cat(ClangReorderFieldsCategory) |
| ) |  |
| static

## ◆ Inplace()

static cl::opt<bool> Inplace | ( | "i" | ,
|  | cl::desc("Overwrite edited files.") | ,
|  | cl::cat(ClangReorderFieldsCategory) |
| ) |  |
| static

## ◆ main()

int main | ( | int | argc,
|  | const char ** | argv
| ) |  |

Definition at line 53 of file ClangReorderFields.cpp.

References ClangReorderFieldsCategory().

## ◆ RecordName()

static cl::opt<std::string> RecordName | ( | "record-name" | ,
|  | cl::Required | ,
|  | cl::desc("The name of the struct/class.") | ,
|  | cl::cat(ClangReorderFieldsCategory) |
| ) |  |
| static

Referenced by clang::reorder_fields::ReorderFieldsAction::newASTConsumer().

## Variable Documentation

## ◆ Usage

const char Usage[] = "A tool to reorder fields in C/C++ structs/classes.\n"

Definition at line 51 of file ClangReorderFields.cpp.