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

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 4 07:36: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.
+
----------------
Quuxplusone wrote:
> HazardyKnusperkeks wrote:
> > curdeius wrote:
> > > You meant "if there is one", right?
> > Yeah
> IMO these options should be named `InRequiresClause` and `InRequiresExpression`: that's where the space is going. The space doesn't go //after// the requires-clause. The space doesn't go //after// the requires-expression.
> It occurs to me that the name of this option could be analogous to the name of the option that controls `[]() {}` versus `[] () {}`... except that it looks like there is no such option (and I'm happy about that). :) Also, the name of that option would probably just be `AfterCaptureList`, which doesn't help us in this case.
I get your point, but the space does not go anywhere in the clause/expression, so `AfterRequiresForClauses`?


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