[all-commits] [llvm/llvm-project] f00f2b: [clang-format] Fix a bug in removing braces for th...

Owen via All-commits all-commits at lists.llvm.org
Sun Aug 28 14:26:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f00f2b3e8d406c503902117669297b99c40207b6
      https://github.com/llvm/llvm-project/commit/f00f2b3e8d406c503902117669297b99c40207b6
  Author: owenca <owenpiano at gmail.com>
  Date:   2022-08-28 (Sun, 28 Aug 2022)

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

  Log Message:
  -----------
  [clang-format] Fix a bug in removing braces for the LLVM style

When an l_brace is wrapped and the line above it ends with a
comment, the annotator adds ColumnLimit to the TotalLength of the
l_brace, so the actual column position of the l_brace must be
adjusted accordingly.

Fixes #57376.

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




More information about the All-commits mailing list