[PATCH] D40288: [clang-format] Add option to group multiple #include blocks when sorting includes
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 22 02:47:43 PST 2017
krasimir added a comment.
Looks good! Just a few nits:
================
Comment at: lib/Format/Format.cpp:1570
IncludesInBlock.push_back({IncludeName, Line, Prev, Category});
+ } else if (Style.IncludeBlocks > FormatStyle::IBS_Preserve &&
+ Trimmed.empty()) {
----------------
Please replace this with two explicit checks for the expected styles. Plus, an `else if` with an empty body is super awkward.
================
Comment at: unittests/Format/SortIncludesTest.cpp:357
+ "#include \"c.h\"\n",
+ "a.cc"));
+}
----------------
What is this testing?
Repository:
rL LLVM
https://reviews.llvm.org/D40288
More information about the cfe-commits
mailing list