Issue |
148436
|
Summary |
Clang-format won't accept the space after let for structured binding declarations
|
Labels |
clang-format
|
Assignees |
|
Reporter |
anordal
|
Just like nobody would remove the space after `const auto`, even when it is possible,
clang-format shouldn't do so just because I define a macro for it.
Clang-format wants to do this:
```diff
// clang-format --style='{IndentWidth: 4, AllowShortFunctionsOnASingleLine: false, ColumnLimit: 0}' letdemo.cpp
#define let const auto
struct Point2D {
int x;
int y;
};
#define let const auto
void demonstrate_basecase() {
const auto [x, y] = Point2D{};
}
void demonstrate_let() {
- let [x, y] = Point2D{};
+ let[x, y] = Point2D{};
}
```
clang-format --version
> clang-format version 20.1.7
Possibly related to #22392.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs