[PATCH] D113369: [clang-format] Extend SpaceBeforeParens for requires

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 8 12:18:20 PST 2021


HazardyKnusperkeks 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.
+
----------------
curdeius wrote:
> You meant "if there is one", right?
Yeah


================
Comment at: clang/unittests/Format/FormatTest.cpp:22599
+
+  Style.SpaceBeforeParens = FormatStyle::SBPO_Custom;
+  Style.SpaceBeforeParensOptions.AfterRequiresClause = true;
----------------
curdeius wrote:
> This test seems redundant. Does it test something else than the above added ones?
No it doesn't, I just thought I would put the requires stuff into the requires test case. I for one work with the gtest filter on single test cases if I work on some issue.


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