[all-commits] [llvm/llvm-project] a94aab: [clang-format] put non-empty catch block on one li...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Wed Dec 15 15:07:12 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a94aab12a4e0bec6cd1eb676a3360fc1b5ac8eee
      https://github.com/llvm/llvm-project/commit/a94aab12a4e0bec6cd1eb676a3360fc1b5ac8eee
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2021-12-15 (Wed, 15 Dec 2021)

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

  Log Message:
  -----------
  [clang-format] put non-empty catch block on one line with AllowShortBlocksOnASingleLine: Empty

https://github.com/llvm/llvm-project/issues/52715

Fixes #52715

`AllowShortBlocksOnASingleLine` seems to never be checked for "Empty" as such if its used it will be considered "Always" as we only ever check `AllowShortBlocksOnASingleLine != Never`

This impacts C++ as well as C# hence the slightly duplicated test.

Reviewed By: curdeius, jbcoe

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




More information about the All-commits mailing list