]> granicus.if.org Git - clang/commit
clang-format: Make include sorting's main include detection configurable.
authorDaniel Jasper <djasper@google.com>
Mon, 21 Mar 2016 14:11:27 +0000 (14:11 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 21 Mar 2016 14:11:27 +0000 (14:11 +0000)
commit5b12ee708d07fc648e3aea349f9832bca0c6db76
treefe8ffbc7de0b659d90d8514da0f37a3dae0ee804
parent3104137223ba0d0cd4cf633c9a1f2a17908cd3bc
clang-format: Make include sorting's main include detection configurable.

This patch adds a regular expression to configure suffixes of an
included file to check whether it is the "main" include of the current
file. Previously, clang-format has allowed arbitrary suffixes on the
formatted file, which is still the case when no IncludeMainRegex is
specified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263943 91177308-0d34-0410-b5e6-96231b3b80d8
docs/ClangFormatStyleOptions.rst
include/clang/Format/Format.h
lib/Format/Format.cpp
unittests/Format/FormatTest.cpp
unittests/Format/SortIncludesTest.cpp