[PATCH] D119680: [clang-format] Fix SpacesInLineCommentPrefix deleting tokens.
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 13 13:37:24 PST 2022
curdeius added a comment.
I thought about using signed ints for Minimum and Maximum in the style, but then, we won't be able to use `-1` for Maximum the same way as now and signed int makes no sense for Minimum...
================
Comment at: clang/lib/Format/BreakableToken.cpp:799-800
+ FirstLineSpaceChange = Minimum - SpacesInPrefix;
+ } else if (static_cast<unsigned>(SpacesInPrefix) >
+ Style.SpacesInLineCommentPrefix.Maximum) {
FirstLineSpaceChange =
----------------
Not strictly necessary, but without the cast we have a signed/unsigned mismatch warning on comparison.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119680/new/
https://reviews.llvm.org/D119680
More information about the cfe-commits
mailing list