[PATCH] D132911: [clang-format] Fix annotating when deleting array of pointers
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 30 12:45:40 PDT 2022
HazardyKnusperkeks added a comment.
Please mark comments as done, when the discussion has ended.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:2376
+ const FormatToken *Prev = PrevToken;
+ if (Prev->is(tok::r_square) && (Prev = Prev->getPreviousNonComment()) &&
+ Prev->is(tok::l_square) && (Prev = Prev->getPreviousNonComment()) &&
----------------
I don't know if this is nice. I think I would prefer `PrevToken->getPreviousNonComment()` and subsequently `PrevToken->getPreviousNonComment()->getPreviousNonComment()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132911/new/
https://reviews.llvm.org/D132911
More information about the cfe-commits
mailing list