[all-commits] [llvm/llvm-project] 5751c4: [clang-format] Improve UnwrappedLineParser::mightF...

Owen via All-commits all-commits at lists.llvm.org
Thu Jan 5 13:23:39 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5751c439be7d00427991e8503e618d0c27a56f89
      https://github.com/llvm/llvm-project/commit/5751c439be7d00427991e8503e618d0c27a56f89
  Author: Owen Pan <owenpiano at gmail.com>
  Date:   2023-01-05 (Thu, 05 Jan 2023)

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

  Log Message:
  -----------
  [clang-format] Improve UnwrappedLineParser::mightFitOnOneLine()

Account for an r_brace that precedes an "else if" statement when
calculating whether the line might fit on one line if the r_brace
is removed.

Fixes #59778.

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




More information about the All-commits mailing list