|
clang 22.0.0git
|
This class manages priorities of C++ #include categories and calculates priorities for headers. More...
#include "clang/Tooling/Inclusions/HeaderIncludes.h"
Public Member Functions | |
| IncludeCategoryManager (const IncludeStyle &Style, StringRef FileName) | |
| int | getIncludePriority (StringRef IncludeName, bool CheckMainHeader) const |
Returns the priority of the category which IncludeName belongs to. | |
| int | getSortIncludePriority (StringRef IncludeName, bool CheckMainHeader) const |
This class manages priorities of C++ #include categories and calculates priorities for headers.
FIXME(ioeric): move this class into implementation file when clang-format's include sorting functions are also moved here.
Definition at line 28 of file HeaderIncludes.h.
| clang::tooling::IncludeCategoryManager::IncludeCategoryManager | ( | const IncludeStyle & | Style, |
| StringRef | FileName ) |
Definition at line 212 of file HeaderIncludes.cpp.
References clang::if().
| int clang::tooling::IncludeCategoryManager::getIncludePriority | ( | StringRef | IncludeName, |
| bool | CheckMainHeader ) const |
Returns the priority of the category which IncludeName belongs to.
If CheckMainHeader is true and IncludeName is a main header, returns
Definition at line 230 of file HeaderIncludes.cpp.
References INT_MAX, and clang::ast_matchers::match().
Referenced by clang::format::sortCppIncludes().
| int clang::tooling::IncludeCategoryManager::getSortIncludePriority | ( | StringRef | IncludeName, |
| bool | CheckMainHeader ) const |
Definition at line 243 of file HeaderIncludes.cpp.
References INT_MAX, and clang::ast_matchers::match().
Referenced by clang::format::sortCppIncludes().