diff options
author | Owen Pan <owenpiano@gmail.com> | 2024-07-11 19:36:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 19:36:42 -0700 |
commit | dcf6b7a8ea9a9be04dd66d20e4a7c55cd0f50a11 (patch) | |
tree | 897ee34f71815673b6408e65704c755344eab633 /clang/lib/Format/WhitespaceManager.cpp | |
parent | 56b73f2a73b082c7b6a17cad37799fc218436be1 (diff) | |
download | llvm-dcf6b7a8ea9a9be04dd66d20e4a7c55cd0f50a11.zip llvm-dcf6b7a8ea9a9be04dd66d20e4a7c55cd0f50a11.tar.gz llvm-dcf6b7a8ea9a9be04dd66d20e4a7c55cd0f50a11.tar.bz2 |
[clang-format] Fix a bug in TCAS_Leave using tabs for indentation (#98427)
Fixes #92530.
Diffstat (limited to 'clang/lib/Format/WhitespaceManager.cpp')
-rw-r--r-- | clang/lib/Format/WhitespaceManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp index 50531ae..a31874a 100644 --- a/clang/lib/Format/WhitespaceManager.cpp +++ b/clang/lib/Format/WhitespaceManager.cpp @@ -1116,7 +1116,7 @@ void WhitespaceManager::alignTrailingComments() { // leave the comments. if (RestoredLineLength >= Style.ColumnLimit && Style.ColumnLimit > 0) break; - C.Spaces = OriginalSpaces; + C.Spaces = C.NewlinesBefore > 0 ? C.Tok->OriginalColumn : OriginalSpaces; continue; } |