From a8caa6392e096b30f7b2057f3307a9e1e3e3fbfe Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Wed, 24 Jun 2020 23:22:36 +0000 Subject: [PATCH] Clang-format: Avoid hardcoded LLVM include-order style Reported by: emaste --- .clang-format | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.clang-format b/.clang-format index 6582f69e4a42..c150c4d3b206 100644 --- a/.clang-format +++ b/.clang-format @@ -134,6 +134,12 @@ IncludeCategories: - Regex: '^\".*\.h\"' Priority: 10 SortPriority: 100 +# LLVM's header include ordering style is almost the exact opposite of ours. +# Unfortunately, they have hard-coded their preferences into clang-format. +# Clobbering this regular expression to avoid matching prevents non-system +# headers from being forcibly moved to the top of the include list. +# http://llvm.org/docs/CodingStandards.html#include-style +IncludeIsMainRegex: 'BLAH_DONT_MATCH_ANYTHING' SortIncludes: true KeepEmptyLinesAtTheStartOfBlocks: true TypenameMacros: