[all-commits] [llvm/llvm-project] 5426b2: [clang-format] PR48535 clang-format Incorrectly Re...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Wed Dec 23 06:49:45 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5426b2f9ed9f6f3a3e1d6452325f7a49a5d08ec4
      https://github.com/llvm/llvm-project/commit/5426b2f9ed9f6f3a3e1d6452325f7a49a5d08ec4
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2020-12-23 (Wed, 23 Dec 2020)

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

  Log Message:
  -----------
  [clang-format] PR48535 clang-format Incorrectly Removes Space After C Style Cast When Type Is Not a Pointer

https://bugs.llvm.org/show_bug.cgi?id=48535

using `SpaceAfterCStyleCast: true`

```
size_t idx = (size_t) a;
size_t idx = (size_t) (a - 1);
```

is formatted as:

```
size_t idx = (size_t) a;
size_t idx = (size_t)(a - 1);
```

This revision aims to improve that by improving the function which tries to identify a CastRParen

Reviewed By: curdeius

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


  Commit: 031743cb5b3c6c2df85a67d8533ef72a95e76cdc
      https://github.com/llvm/llvm-project/commit/031743cb5b3c6c2df85a67d8533ef72a95e76cdc
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2020-12-23 (Wed, 23 Dec 2020)

  Changed paths:
    M clang/lib/Format/BreakableToken.cpp
    M clang/unittests/Format/FormatTestComments.cpp

  Log Message:
  -----------
  [clang-format] PR48539 ReflowComments breaks Qt translation comments

https://bugs.llvm.org/show_bug.cgi?id=48539

Add support for Qt Translator Comments to reflow

When reflown and a part of the comments are added on a new line, it should repeat these extra characters as part of the comment token.

Reviewed By: curdeius, HazardyKnusperkeks

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


Compare: https://github.com/llvm/llvm-project/compare/6e603464959d...031743cb5b3c


More information about the All-commits mailing list