[all-commits] [llvm/llvm-project] b40e9d: [clang-format] Avoid breaking )( with BlockIndent

Gedare Bloom via All-commits all-commits at lists.llvm.org
Tue Dec 6 01:05:09 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b40e9dce0a67beab352f7b7be43f13190f69b69c
      https://github.com/llvm/llvm-project/commit/b40e9dce0a67beab352f7b7be43f13190f69b69c
  Author: Gedare Bloom <gedare at rtems.org>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

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

  Log Message:
  -----------
  [clang-format] Avoid breaking )( with BlockIndent

The BracketAlignmentStyle BAS_BlockIndent was forcing breaks before a
closing right parenthesis yielding strange-looking results in case of
code structures that have a left parens immediately following a right
parens ")(" such as is seen with indirect function calls via function
pointers and with type casting.

Fixes 57250.
Fixes 58496.

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




More information about the All-commits mailing list