[Development] proposed clang-format improvements for lambda functions

Thiago Macieira thiago.macieira at intel.com
Wed Oct 8 04:40:36 CEST 2025


On Tuesday, 7 October 2025 17:45:37 Pacific Daylight Time Tim Blechmann via 
Development wrote:
> AllowShortLambdasOnASingleLine: None
> LambdaBodyIndentation: OuterScope
> 
> rationale:
> * single-line lambda functions are harmful, as one cannot set different
> breakpoints for construction and invocation of the lambda function.
> * indent lambda bodies at the outer scope, so that the indentation
> reflects the nesting level.

I kind of like single-line lambdas, but I understand not doing them for 
breakpoint purposes. Still, we may want them for simple parameters. That's a 
stylistic choice.

I'm not sure I understand the second. More importantly, though: does Qt 
Creator have a setting for that? If so, what it is? If not, then DOA.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Principal Engineer - Intel Data Center Group
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5150 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20251007/52ede10e/attachment.bin>


More information about the Development mailing list