[PATCH] D137755: [clang-format] Treats &/&& as reference when followed by ',' or ')'.

Micah Weston via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 10 14:39:11 PST 2022


red1bluelost marked an inline comment as done.
red1bluelost added a comment.

Made a GitHub issue and addressed the current comments. :)



================
Comment at: clang/lib/Format/TokenAnnotator.cpp:2355
+        NextToken->isOneOf(tok::arrow, tok::equal, tok::kw_noexcept, tok::comma,
+                           tok::r_paren) ||
         NextToken->canBePointerOrReferenceQualifier() ||
----------------
MyDeveloperDay wrote:
> 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!.
Thanks for the suggestion! Didn't realize there were tests for the tokenizer. I got those added now.


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