aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-06-29 23:20:54 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-06-29 23:20:54 +0000
commitfe7b37a8ff38f40535f98de2e7b72bdd185cd1ae (patch)
treed845f2fc06ccbdee5d7f81a0c815153120f680ff /include
parentae1ed388cd6e265fdbb773a11f6797dee9d16fd6 (diff)
[clang-format] Switch to case-insensitive header matching and use it to
improve support for LLVM-style include sorting. This really is a collection of improvements to the rules for LLVM include sorting: - We have gmock headers now, so it adds support for those to one of the categories. - LLVM does use 'FooTest.cpp' files to test 'Foo.h' so it adds that suffix for finding a main header. - At times the test file's case may not match the header file's case, so switch to case-insensitive regex matching of header names. With this set of changes, I can't spot any misbehaviors when re-sorting all of LLVM's unittest '#include' lines. Thanks to Eric and Daniel for help testing and refining the patch during review! Differential Revision: https://reviews.llvm.org/D33932 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/Format/Format.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/Format/Format.h b/include/clang/Format/Format.h
index c1b62477ed..5b587a4db0 100644
--- a/include/clang/Format/Format.h
+++ b/include/clang/Format/Format.h
@@ -966,7 +966,7 @@ struct FormatStyle {
/// IncludeCategories:
/// - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
/// Priority: 2
- /// - Regex: '^(<|"(gtest|isl|json)/)'
+ /// - Regex: '^(<|"(gtest|gmock|isl|json)/)'
/// Priority: 3
/// - Regex: '.*'
/// Priority: 1