[PATCH] D120140: [clang-format] Avoid inserting space after C++ casts.
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 18 09:29:02 PST 2022
curdeius added inline comments.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:1740
+ assert(Current.MatchingParen);
+ Current.MatchingParen->setType(TT_Unknown);
+ }
----------------
To add some context, in the failing cases, the opening parenthesis was set to type `TT_FunctionTypeLParen` that we don't want because combined with a `*` after the next paren, it adds a space (cf. https://github.com/llvm/llvm-project/blob/331e8e4e27be5dd673898a89a7cf00e76903216a/clang/lib/Format/TokenAnnotator.cpp#L3105-L3109).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120140/new/
https://reviews.llvm.org/D120140
More information about the cfe-commits
mailing list