[PATCH] D66653: [clang-format] Turn include regrouping on for Google ObjC style
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 23 07:21:33 PDT 2019
krasimir created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Turns back include regrouping for Google ObjC style
Repository:
rC Clang
https://reviews.llvm.org/D66653
Files:
lib/Format/Format.cpp
unittests/Format/SortIncludesTest.cpp
Index: unittests/Format/SortIncludesTest.cpp
===================================================================
--- unittests/Format/SortIncludesTest.cpp
+++ unittests/Format/SortIncludesTest.cpp
@@ -653,18 +653,6 @@
EXPECT_EQ(Code, sort(Code, "input.h", 0));
}
-
-TEST_F(SortIncludesTest, DoNotRegroupGroupsInGoogleObjCStyle) {
- FmtStyle = getGoogleStyle(FormatStyle::LK_ObjC);
-
- EXPECT_EQ("#include <a.h>\n"
- "#include <b.h>\n"
- "#include \"a.h\"",
- sort("#include <b.h>\n"
- "#include <a.h>\n"
- "#include \"a.h\""));
-}
-
} // end namespace
} // end namespace format
} // end namespace clang
Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -898,11 +898,6 @@
} 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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66653.216843.patch
Type: text/x-patch
Size: 1291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190823/b5b79710/attachment.bin>
More information about the cfe-commits
mailing list