[PATCH] D137755: [clang-format] Treats &/&& as reference when followed by ',' or ')'.
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 10 02:10:27 PST 2022
MyDeveloperDay added a comment.
Its always good if you have a github issue to add that to the summary (just to tie stuff together), if you don't feel free to go over there an log a bug.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:2355
+ NextToken->isOneOf(tok::arrow, tok::equal, tok::kw_noexcept, tok::comma,
+ tok::r_paren) ||
NextToken->canBePointerOrReferenceQualifier() ||
----------------
nowadays we add a TokenAnnotator test (they are very easy to write), this lets us ensure its getting annotated correctly. (which is really the bug here),
but your tests below are great too!.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137755/new/
https://reviews.llvm.org/D137755
More information about the cfe-commits
mailing list