[PATCH] D129443: [clang-format] Add option for aligning requires clause body

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 12 20:05:39 PDT 2022


owenpan added inline comments.


================
Comment at: clang/docs/ReleaseNotes.rst:540
 ------------
-- Add `RemoveSemicolon` option for removing `;` after a non-empty function definition.
+- Add ``RemoveSemicolon`` option for removing ``;`` after a non-empty function definition.
+- Add ``RequiresExpressionIndentation`` option for configuring the alignment of requires-expressions.
----------------
HazardyKnusperkeks wrote:
> Unrelated.
> Unrelated.

I’m ok with fixing it here so that we don’t need another patch.


================
Comment at: clang/lib/Format/Format.cpp:1304
   LLVMStyle.RequiresClausePosition = FormatStyle::RCPS_OwnLine;
+  LLVMStyle.RequiresExpressionIndentation = FormatStyle::REI_Keyword;
   LLVMStyle.SeparateDefinitionBlocks = FormatStyle::SDS_Leave;
----------------
HazardyKnusperkeks wrote:
> owenpan wrote:
> > Delete it.
> Why delete?
> Set it to OuterScope.
> Why delete?
> Set it to OuterScope.

Cuz OuterScope is the default. :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129443



More information about the cfe-commits mailing list