llvm-project
7ab2ff44 - [clang-format] Fix incorrect trailing comment and escaped newlines when AlignArrayOfStructures is enabled (#180305)

Commit
44 days ago
[clang-format] Fix incorrect trailing comment and escaped newlines when AlignArrayOfStructures is enabled (#180305) This change fixes how the spaces are modified during alignment. Previously it was inconsistent whether the `StartOfTokenColumn` and `PreviousEndOfTokenColumn` members of `WhitespaceManager::Change`s were also updated when their `Spaces` member was changed to align tokens. A new function has been added that properly maintains the relationship between these members, and all places that directly modified `Spaces` have been replaced with calls to this new function. Fixes https://github.com/llvm/llvm-project/issues/138151. Fixes https://github.com/llvm/llvm-project/issues/85937. Fixes https://github.com/llvm/llvm-project/issues/53442. Tests have been added to ensure they stay fixed. Attribution Note - I have been authorized to contribute this change on behalf of my company: ArenaNet LLC
Author
Parents
Loading