[PATCH] D113369: [clang-format] Extend SpaceBeforeParens for requires
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 7 23:31:05 PST 2021
curdeius added inline comments.
================
Comment at: clang/docs/ClangFormatStyleOptions.rst:3756
+ * ``bool AfterRequiresClause`` If ``true``, put space between requires keyword in a requires clause and
+ opening parentheses, if is are one.
+
----------------
You meant "if there is one", right?
================
Comment at: clang/unittests/Format/FormatTest.cpp:14306
+ SpaceAfterRequires.SpaceBeforeParens = FormatStyle::SBPO_Custom;
+ SpaceAfterRequires.SpaceBeforeParensOptions.AfterRequiresClause = true;
+ SpaceAfterRequires.SpaceBeforeParensOptions.AfterRequiresExpression = true;
----------------
I'd like to see some tests for mixed true/false, false/true values of these parameters. You only test false/false and true/true combinations so far.
================
Comment at: clang/unittests/Format/FormatTest.cpp:22599
+
+ Style.SpaceBeforeParens = FormatStyle::SBPO_Custom;
+ Style.SpaceBeforeParensOptions.AfterRequiresClause = true;
----------------
This test seems redundant. Does it test something else than the above added ones?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113369/new/
https://reviews.llvm.org/D113369
More information about the cfe-commits
mailing list