[PATCH] D154184: [clang-format] Correctly annotate */&/&& in operator function calls

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 29 23:29:05 PDT 2023


owenpan created this revision.
Herald added projects: All, clang, clang-format.
Herald added a subscriber: cfe-commits.
Herald added reviewers: rymiel, HazardyKnusperkeks, MyDeveloperDay.
owenpan requested review of this revision.

Reverts 4986f3f2f220 <https://reviews.llvm.org/rG4986f3f2f220e4fd2fef4b08e550b399c9f45a9f> (but keeps its unit tests) and fixes #49973 <https://github.com/llvm/llvm-project/issues/49973> differently.

Also fixes bugs that incorrectly annotate the `operator` keyword as `TT_FunctionDeclarationName` in function calls and as `TT_Unknown` in function declarations and definitions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154184

Files:
  clang/lib/Format/TokenAnnotator.cpp
  clang/unittests/Format/FormatTest.cpp
  clang/unittests/Format/TokenAnnotatorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154184.536120.patch
Type: text/x-patch
Size: 9583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230630/ea3d51b8/attachment.bin>


More information about the cfe-commits mailing list