Skip to content
Commit ad83bead authored by Maíra Canal's avatar Maíra Canal Committed by Owen Pan
Browse files

[clang-format] Don't move comments if AlignTrailingComments: Leave

For comments that start after a new line, currently, the comments are
being indented. This happens because the OriginalWhitespaceRange
considers newlines on the range. Therefore, when AlignTrailingComments:
Kind: Leave, deduct the number of newlines before the token to calculate
the number of spaces for trailing comments.

Fixes #59203.

Differential Revision: https://reviews.llvm.org/D139029
parent 2b234ce3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment