[clang] [clang-format] Add options to control wrapped lambda brace indent. (PR #143249)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 7 05:56:59 PDT 2025


================
@@ -1547,6 +1547,38 @@ struct FormatStyle {
     bool BeforeWhile;
     /// Indent the wrapped braces themselves.
     bool IndentBraces;
+    /// Indent nested wrapped lambda braces.
----------------
rmarker wrote:

Hmm, yeah, I based the name off of the description in the code. I.e. that it uses `Current.NestingLevel`.
I hadn't thought about the lambda in lambda.
Do you have any ideas of something clearer?
Maybe `IndentBracesLambdaTopLevel` for the unnested and then just `IndentBracesLambda` for the others? (I cannot think of an immediately obvious name for the nested case).

https://github.com/llvm/llvm-project/pull/143249


More information about the cfe-commits mailing list