[PATCH] D124748: [clang-format] Fix whitespace counting stuff
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 16 02:35:40 PDT 2022
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/FormatTokenLexer.cpp:839
+void FormatTokenLexer::resizeToken(size_t NewLen) {
+ resetLexer(SourceMgr.getFileOffset(Lex->getSourceLocation(
----------------
sstwcw wrote:
> HazardyKnusperkeks wrote:
> > Can you add some documentation?
> Is this comment enough?
Maybe some reasoning?
Also I think NewLen shouldn't be bigger than `FormatTok->TokenText.size()` should it? Add an assert and a comment on the restriction.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124748/new/
https://reviews.llvm.org/D124748
More information about the cfe-commits
mailing list