[all-commits] [llvm/llvm-project] fbd86d: [clang-reorder-fields] Reorder leading comments (#...

Clement Courbet via All-commits all-commits at lists.llvm.org
Wed Jan 22 04:42:22 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fbd86d05fe51d45f19df8d63aee41d979c268f8f
      https://github.com/llvm/llvm-project/commit/fbd86d05fe51d45f19df8d63aee41d979c268f8f
  Author: Clement Courbet <courbet at google.com>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp
    M clang-tools-extra/clang-tidy/utils/LexerUtils.cpp
    M clang-tools-extra/test/clang-reorder-fields/Comments.cpp
    M clang/include/clang/Lex/Lexer.h
    M clang/lib/Lex/Lexer.cpp
    M clang/unittests/Lex/LexerTest.cpp

  Log Message:
  -----------
  [clang-reorder-fields] Reorder leading comments (#123740)

Similarly to https://github.com/llvm/llvm-project/pull/122918, leading
comments are currently not being moved.

```
struct Foo {
  // This one is the cool field.
  int a;
  int b;
};
```

becomes:

```
struct Foo {
  // This one is the cool field.
  int b;
  int a;
};
```

but should be:

```
struct Foo {
  int b;
  // This one is the cool field.
  int a;
};
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list