[clang-format] Add ext/ to google include categories
authorKrasimir Georgiev <krasimir@google.com>
Tue, 26 Sep 2017 14:58:29 +0000 (14:58 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Tue, 26 Sep 2017 14:58:29 +0000 (14:58 +0000)
Summary: This adds an ext/ header include category for google style.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D38243

llvm-svn: 314211

clang/lib/Format/Format.cpp

index 0b70ce2..cb0a010 100644 (file)
@@ -665,7 +665,8 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
   GoogleStyle.AlwaysBreakTemplateDeclarations = true;
   GoogleStyle.ConstructorInitializerAllOnOneLineOrOnePerLine = true;
   GoogleStyle.DerivePointerAlignment = true;
-  GoogleStyle.IncludeCategories = {{"^<.*\\.h>", 1}, {"^<.*", 2}, {".*", 3}};
+  GoogleStyle.IncludeCategories = {
+      {"^<ext/.*\\.h>", 2}, {"^<.*\\.h>", 1}, {"^<.*", 2}, {".*", 3}};
   GoogleStyle.IncludeIsMainRegex = "([-_](test|unittest))?$";
   GoogleStyle.IndentCaseLabels = true;
   GoogleStyle.KeepEmptyLinesAtTheStartOfBlocks = false;