[PATCH] D127873: [clang-format] Fix misplacemnt of `*` in declaration of pointer to struct
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 16 07:33:49 PDT 2022
curdeius added inline comments.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:2313
+ if (PrevToken->is(tok::r_brace) && Tok.isOneOf(tok::amp, tok::ampamp))
+ return TT_BinaryOperator;
----------------
Instead of checking for `r_brace`, maybe it would be possible to check `PrevToken->MatchingParen` for being `TT_RecordLBrace`?
This way, we'd be precise.
WDYT?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127873/new/
https://reviews.llvm.org/D127873
More information about the cfe-commits
mailing list