[PATCH] D119419: [clang-format] Do not remove required spaces when aligning tokens.
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 10 02:09:44 PST 2022
curdeius added inline comments.
================
Comment at: clang/lib/Format/WhitespaceManager.cpp:334-337
+ if (Changes[i].NewlinesBefore == 0)
+ Changes[i].Spaces =
+ std::max(Changes[i].Spaces,
+ static_cast<int>(Changes[i].Tok->SpacesRequiredBefore));
----------------
On a second thought, it seems like a workaround only and a real solution would be to fix https://github.com/llvm/llvm-project/issues/53699 that I've just created.
It fixes an immediate problem though.
I'll add a fixme in a later revision (or when landing) to remove this when the abovementioned bug is solved properly.
Then, this problem should be caught by the assertion added later below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119419/new/
https://reviews.llvm.org/D119419
More information about the cfe-commits
mailing list