Issue 126873
Summary [clang-format 21.0.0] Operands aligned by AlignOperands are not aligned to equals signs aligned by AlignConsecutiveAssignments
Labels clang-format
Assignees
Reporter ETG153
    As title reads: When an equals sign (=) is moved right by AlignConsecutiveAssignments, any binary sign following that row is aligned to where the sign would be if AlignConsecutiveAssignments was disabled.

Tested on/with:
C++ 11 - no other languages have been tested (yet)
clang-format 21.0.0git (https://github.com/llvm/llvm-project.git 64735ad63975c1126f84dbf7921ce4341dfa2419)

Example:
`AlignConsecutiveAssignments: Consecutive`
`AlignOperands: AlignAfterOperator`
```cpp
// Expected behavior:
veryveryverylongvariablename = somethingelse;
shortervariablename = anotherveryveryveryverylonglonglongvariablename
 + somevariablethatwastoolongtofitonthesamerow;

// What actually happens:
veryveryverylongvariablename = somethingelse;
shortervariablename = anotherveryveryveryverylonglonglongvariablename
 + somevariablethatwastoolongtofitonthesamerow;
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to