[clang-tools-extra] [clang-reorder-fields] Use expanded location for macros (PR #142147)

2025-06-03 Thread Vladimir Vuksanovic via cfe-commits
vvuksanovic wrote: @alexander-shaposhnikov https://github.com/llvm/llvm-project/pull/142147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-reorder-fields] Prevent rewriting unsupported cases (PR #142149)

2025-06-03 Thread Vladimir Vuksanovic via cfe-commits
vvuksanovic wrote: @alexander-shaposhnikov https://github.com/llvm/llvm-project/pull/142149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-reorder-fields] Use expanded location for macros (PR #142147)

2025-05-30 Thread Vladimir Vuksanovic via cfe-commits
https://github.com/vvuksanovic created https://github.com/llvm/llvm-project/pull/142147 Fixes macros being replaced instead of their expansion. Closes #52632 >From 82f35e120d075eb0f55d02ff2a4d750e6e352475 Mon Sep 17 00:00:00 2001 From: Vladimir Vuksanovic Date: Fri, 30 May 2025 05:41:09 -0700

[clang-tools-extra] [clang-reorder-fields] Prevent rewriting unsupported cases (PR #142149)

2025-05-30 Thread Vladimir Vuksanovic via cfe-commits
https://github.com/vvuksanovic created https://github.com/llvm/llvm-project/pull/142149 Add checks to prevent rewriting when doing so might result in incorrect code. The following cases are checked: - There are multiple field declarations in one statement like `int a, b` - Multiple fields are c

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-05-30 Thread Vladimir Vuksanovic via cfe-commits
https://github.com/vvuksanovic created https://github.com/llvm/llvm-project/pull/142150 Initializer lists with designators, missing elements or omitted braces can now be rewritten. Any missing designators are added and they get sorted according to the new order. ``` struct Foo { int a; in