struct IncludeStyle

Declaration

struct IncludeStyle { /* full declaration omitted */ };

Description

Style for sorting and grouping C++ #include directives.

Declared at: clang/include/clang/Tooling/Inclusions/IncludeStyle.h:20

Member Variables

public clang::tooling::IncludeStyle::IncludeBlocksStyle IncludeBlocks
Dependent on the value, multiple ``#include`` blocks can be sorted as one and divided based on category.
public std::vector<IncludeCategory> IncludeCategories
public std::string IncludeIsMainRegex
For example, if configured to "(_test)?$", then a header a.h would be seen as the "main" include in both a.cc and a_test.cc.
public std::string IncludeIsMainSourceRegex
For example, if this option is configured to ``(Impl . hpp)$``, then a file ``ClassImpl.hpp`` is considered "main" (in addition to ``Class.c``, ``Class.cc``, ``Class.cpp`` and so on) and "main include file" logic will be executed (with *IncludeIsMainRegex* setting also being respected in later phase). Without this option set, ``ClassImpl.hpp`` would not have the main include file put on top before any other include.