[PATCH] D94661: [clang-format] [PR19056] Add support for access modifiers indentation

Jakub Budiský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 5 00:21:15 PST 2021


Budovi planned changes to this revision.
Budovi added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:19056
+TEST_F(FormatTest, IndentAccessModifiers) {
+  FormatStyle Style = getLLVMStyle();
+  Style.AllowShortEnumsOnASingleLine = false;
----------------
curdeius wrote:
> Please add an assertion that IndentWidth == 2 to make the test easier to understand.
The written tests rely on several other "defaults" from the LLVM style. If somebody changes those defaults these unit tests (along with many others) will fail. This will also be true if an assertion is present to test this condition. It would be possible to reassign those values but this goes against how the rest of the tests are implemented.

But I agree that I could improve the readability by adding brief comments that point out important settings and the purpose of the included tests.


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

https://reviews.llvm.org/D94661



More information about the cfe-commits mailing list