| BasedOnStyle: Chromium | |
| Standard: c++23 | |
| # Sort #includes by following | |
| # https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes | |
| # | |
| # ref: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#includeblocks | |
| IncludeBlocks: Regroup | |
| # ref: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#includecategories | |
| IncludeCategories: | |
| # The win32 api has all sorts of implicit include order dependencies :-/ | |
| # Give a few headers special priorities that make sure they appear before | |
| # all other headers. | |
| - Regex: '^<objbase\.h>' # This has to be before initguid.h. | |
| Priority: 1 | |
| - Regex: '^<(atlbase|initguid|mmdeviceapi|ocidl|ole2|shobjidl|tchar|unknwn|windows|winsock2|winternl|ws2tcpip)\.h>' | |
| Priority: 2 | |
| # UIAutomation*.h needs to be after base/win/atl.h. | |
| # Note the low priority number. | |
| - Regex: '^<UIAutomation.*\.h>' | |
| Priority: 6 | |
| # Other C system headers. | |
| - Regex: '^<.*\.h>' | |
| Priority: 3 | |
| # C++ standard library headers. | |
| - Regex: '^<.*>' | |
| Priority: 4 | |
| # windows_h_disallowed.h should appear last. Note the low priority number. | |
| - Regex: '"(.*/)?windows_h_disallowed\.h"' | |
| Priority: 7 | |
| # Other libraries. | |
| - Regex: '.*' | |
| Priority: 5 | |
| # ref: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#includeismainregex | |
| IncludeIsMainRegex: "\ | |
| (_(32|64|android|apple|chromeos|freebsd|fuchsia|fuzzer|ios|linux|mac|openbsd|posix|stubs?|win))?\ | |
| (_(unit|browser|perf|interactive_ui)?tests?)?$" |