[all-commits] [llvm/llvm-project] e57f57: [clang-format] fix alignment w/o binpacked args

cha5on via All-commits all-commits at lists.llvm.org
Mon May 16 01:25:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e57f57841fbb0cd1d1dbd3237c2cbe6ce15984dd
      https://github.com/llvm/llvm-project/commit/e57f57841fbb0cd1d1dbd3237c2cbe6ce15984dd
  Author: Gregory Fong <gregory.0xf0 at gmail.com>
  Date:   2022-05-16 (Mon, 16 May 2022)

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

  Log Message:
  -----------
  [clang-format] fix alignment w/o binpacked args

The combination of

- AlignConsecutiveAssignments.Enabled = true
- BinPackArguments = false

would result in the first continuation line of a braced-init-list being
improperly indented (missing a shift) when in a continued function call.
Indentation was also wrong for braced-init-lists continuing a
direct-list-initialization.  Check for opening braced lists in
continuation and ensure that the correct shift occurs.

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

Reviewed By: curdeius

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




More information about the All-commits mailing list