[all-commits] [llvm/llvm-project] fd33cc: [clang-format] Fix AlignConsecutiveAssignments bre...

Marek Kurdej via All-commits all-commits at lists.llvm.org
Tue Feb 1 00:18:10 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd33cca762fac265d28abbb080eec57f011f7cb4
      https://github.com/llvm/llvm-project/commit/fd33cca762fac265d28abbb080eec57f011f7cb4
  Author: Marek Kurdej <marek.kurdej+llvm.org at gmail.com>
  Date:   2022-02-01 (Tue, 01 Feb 2022)

  Changed paths:
    M clang/lib/Format/WhitespaceManager.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Fix AlignConsecutiveAssignments breaking lambda formatting.

Fixes https://github.com/llvm/llvm-project/issues/52772.

This patch fixes the formatting of the code:
```
auto aaaaaaaaaaaaaaaaaaaaa = {};
auto b                     = g([] {
  return;
});
```
which should be left as is, but before this patch was formatted to:
```
auto aaaaaaaaaaaaaaaaaaaaa = {};
auto b                     = g([] {
  return;
                    });
```

Reviewed By: MyDeveloperDay, HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D115972




More information about the All-commits mailing list