[all-commits] [llvm/llvm-project] 592367: [clang-format] regression from clang-format v13

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Mon Feb 7 13:22:52 PST 2022


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 592367ab7ea8c70eb26f2a6a7ddeb05b50322545
      https://github.com/llvm/llvm-project/commit/592367ab7ea8c70eb26f2a6a7ddeb05b50322545
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2022-02-07 (Mon, 07 Feb 2022)

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

  Log Message:
  -----------
  [clang-format] regression from clang-format v13

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

The following source

```
namespace A {

template <int N> struct Foo<char[N]> {
  void foo() { std::cout << "Bar"; }
}; // namespace A
```

is incorrectly formatted as:

```
namespace A {

template <int N> struct Foo<char[N]>{void foo(){std::cout << "Bar";
}
}
; // namespace A
```

This looks to be caused by https://github.com/llvm/llvm-project/commit/5c2e7c9ca043d92bed75b08e653fb47c384edd13

Reviewed By: curdeius

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

(cherry picked from commit 23fc20e06c088acff81a06ad546a848bee083051)




More information about the All-commits mailing list