clang-tools 3.8.0

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | List of all members
clang::tidy::IncludeSorter Class Reference

`#include <IncludeSorter.h>`

## Public Types
enum | IncludeStyle { IS_LLVM = 0, IS_Google = 1 }
enum | IncludeKinds { IK_MainTUInclude = 0, IK_CSystemInclude = 1, IK_CXXSystemInclude = 2, IK_NonSystemInclude = 3, IK_InvalidInclude = 4 }

## Public Member Functions
| IncludeSorter (const SourceManager *SourceMgr, const LangOptions *LangOpts, const FileID FileID, StringRef FileName, IncludeStyle Style)
const FileID | current_FileID () const
void | AddInclude (StringRef FileName, bool IsAngled, SourceLocation HashLocation, SourceLocation EndLocation)
std::vector< FixItHint > | GetEdits ()
Optional< FixItHint > | CreateIncludeInsertion (StringRef FileName, bool IsAngled)

## Static Public Member Functions
static IncludeStyle | parseIncludeStyle (const std::string &Value)
static StringRef | toString (IncludeStyle Style)

## Detailed Description

Definition at line 23 of file IncludeSorter.h.

## Member Enumeration Documentation

enum clang::tidy::IncludeSorter::IncludeKinds

Enumerator
IK_MainTUInclude |
IK_CSystemInclude |
IK_CXXSystemInclude |
IK_NonSystemInclude |
IK_InvalidInclude |

Definition at line 35 of file IncludeSorter.h.

enum clang::tidy::IncludeSorter::IncludeStyle

Enumerator
IS_LLVM |
IS_Google |

Definition at line 26 of file IncludeSorter.h.

## Constructor & Destructor Documentation

clang::tidy::IncludeSorter::IncludeSorter | ( | const SourceManager * | SourceMgr,
|  | const LangOptions * | LangOpts,
|  | const FileID | FileID,
|  | StringRef | FileName,
|  | IncludeStyle | Style
| ) |  |

Definition at line 84 of file IncludeSorter.cpp.

## Member Function Documentation

void clang::tidy::IncludeSorter::AddInclude | ( | StringRef | FileName,
|  | bool | IsAngled,
|  | SourceLocation | HashLocation,
|  | SourceLocation | EndLocation
| ) |  |

Definition at line 91 of file IncludeSorter.cpp.

References IK_InvalidInclude.

Optional< FixItHint > clang::tidy::IncludeSorter::CreateIncludeInsertion | ( | StringRef | FileName,
|  | bool | IsAngled
| ) |  |

Definition at line 112 of file IncludeSorter.cpp.

References IK_InvalidInclude.

const FileID clang::tidy::IncludeSorter::current_FileID | ( |  | ) | const
| inline

Definition at line 50 of file IncludeSorter.h.

std::vector< FixItHint > clang::tidy::IncludeSorter::GetEdits | ( |  | ) |

Definition at line 177 of file IncludeSorter.cpp.

References IK_InvalidInclude.

IncludeSorter::IncludeStyle clang::tidy::IncludeSorter::parseIncludeStyle | ( | const std::string & | Value | ) |
| static

Definition at line 286 of file IncludeSorter.cpp.

References IS_Google, and IS_LLVM.

StringRef clang::tidy::IncludeSorter::toString | ( | IncludeStyle | Style | ) |
| static

Definition at line 290 of file IncludeSorter.cpp.

References IS_LLVM.

Referenced by clang::tidy::modernize::PassByValueCheck::storeOptions(), clang::tidy::MoveConstructorInitCheck::storeOptions(), and clang::tidy::modernize::ReplaceAutoPtrCheck::storeOptions().

The documentation for this class was generated from the following files:

- IncludeSorter.h
- IncludeSorter.cpp