[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

Fred Grim via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 7 13:12:33 PDT 2021


feg208 marked 4 inline comments as done.
feg208 added a comment.

I think I have all the tests and requested review comments rolled up



================
Comment at: clang/unittests/Format/FormatTest.cpp:16352
 
+template <size_t M, size_t N>
+auto createStylesImpl(
----------------
curdeius wrote:
> HazardyKnusperkeks wrote:
> > This is a nice approach!
> > 
> > Could it be made constexpr? I'm not sure about C++14.
> Personally, I'm not really fond of testing all the combinations of styles. It adds little value to those tests.
> I find it interesting to find problematic edge cases (which then should be added to the test suite "manually").
> Also, when a test like this fails, it would be hard to see with which style it failed.
I think it could be constexpr (thats the direction I originally started which lead to much moaning about the lack of fold expressions) however getLLVMStyle() is not constexpr and it felt inappropriate for this commit to change the interface to that function even if the change were relatively harmless.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101868/new/

https://reviews.llvm.org/D101868



More information about the cfe-commits mailing list