llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.83k stars 11.46k forks source link

[ClangFormat] AllowShortLambdasOnASingleLine not honored #87386

Open epitavy opened 5 months ago

epitavy commented 5 months ago

clang-format with AllowShortLambdasOnASingleLine : Inline changes this code

func(a, []() {});
func(a, []() {}, b);

to this code

func(a, []() {});
func(
      a, []() {}, b);

where I expect no changes.

I think this is a bug, but maybe there is a workaround ?

llvmbot commented 5 months ago

@llvm/issue-subscribers-clang-format

Author: None (epitavy)

clang-format with `AllowShortLambdasOnASingleLine : Inline` changes this code ```cpp func(a, []() {}); func(a, []() {}, b); ``` to this code ```cpp func(a, []() {}); func( a, []() {}, b); ``` where I expect no changes. I think this is a bug, but maybe there is a workaround ?