summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2019-04-04 14:04:26 +0000
committerKrasimir Georgiev <krasimir@google.com>2019-04-04 14:04:26 +0000
commit00e7ae9f80cc9f8d4792b96bbc0f2a964b939b32 (patch)
tree14d6da5f05f7e0d931624fa13e0aa8b4358f08ad /clang/lib/Format/Format.cpp
parenteefa343df559ccee9a855f2491bc1c46ea8c0c59 (diff)
downloadbcm5719-llvm-00e7ae9f80cc9f8d4792b96bbc0f2a964b939b32.tar.gz
bcm5719-llvm-00e7ae9f80cc9f8d4792b96bbc0f2a964b939b32.zip
[clang-format] Preserve include blocks in ObjC Google style
Summary: r357567 started to regroup include block for Google style; it was meant to apply only for C++. This patch reverts this for ObjC. Reviewers: ioeric Reviewed By: ioeric Subscribers: thakis, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60263 llvm-svn: 357695
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 49977b6eff8..8d86be5b3ae 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -877,6 +877,11 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
} else if (Language == FormatStyle::LK_ObjC) {
GoogleStyle.AlwaysBreakBeforeMultilineStrings = false;
GoogleStyle.ColumnLimit = 100;
+ // "Regroup" doesn't work well for ObjC yet (main header heuristic,
+ // relationship between ObjC standard library headers and other heades,
+ // #imports, etc.)
+ GoogleStyle.IncludeStyle.IncludeBlocks =
+ tooling::IncludeStyle::IBS_Preserve;
}
return GoogleStyle;
OpenPOWER on IntegriCloud