[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 9 17:02:25 PDT 2024
owenca wrote:
> Technically also applies to attributes applied to the return type of the lambda, i.e.
>
> ```
> int main() {
> very_long_function_name_yes_it_is_really_long(
> // also happens with constexpr specifier
> [](auto n) [[attribute]]
> -> std::enable_if_t<
> std::is_arithmetic<decltype(n)>::value &&
> !std::is_same<std::remove_cv_t<decltype(n)>, bool>::value> {
> do_something(n * 2);
> });
> }
> ```
>
> ...but currently at least no valid C++ attribute can go in that spot
We can easily take care of it though. See https://github.com/llvm/llvm-project/pull/94560#discussion_r1632406068.
https://github.com/llvm/llvm-project/pull/94560
More information about the cfe-commits
mailing list