Skip to content

Clang-format - AllowShortLambdasOnASingleLine - doesn't work for braced called constructers #125430

@robert-andrzejuk

Description

@robert-andrzejuk

Set: AllowShortLambdasOnASingleLine : Inline

Example (brace):

      auto guard = scope_exit{[&]{exit_status = true;}};

formats to:

      auto guard = scope_exit{ [&]
                               {
                                   exit_status = true;
                                } };

Should be:

      auto guard = scope_exit{[&] { exit_status = true; }};

This works correctly with parenthesis constructor parameters.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions