| Issue |
85773
|
| Summary |
[clang-format] Tree way comparism detected as clang format violation.
|
| Labels |
clang,
clang-format
|
| Assignees |
|
| Reporter |
hruskape
|
Minimal peace of code taken from [1]
```
struct Point
{
int x;
int y;
auto operator<=>(const Point&) const = default;
// ... non-comparison functions ...
};
```
With clang-format version 16.0.6, no problem detected.
With clang-format version 17.0.5 following error is printed.
Tool suggested modification render code not to be possible to compile.
```
clang-format --dry-run test.cpp
./test.cpp:5:20: error: code should be clang-formatted [-Wclang-format-violations]
auto operator<=>(const Point&) const = default;
^
./test.cpp:5:21: error: code should be clang-formatted [-Wclang-format-violations]
auto operator<=>(const Point&) const = default;
^
FAILED clang-format found errors!
```
[1] https://en.cppreference.com/w/cpp/language/default_comparisons
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs