[PATCH] D134853: [clang-format] Correctly annotate UDLs as OverloadedOperator

Emilia Dreamer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 17 21:50:44 PDT 2022


rymiel added inline comments.


================
Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:413
+  EXPECT_TOKEN(Tokens[3], tok::string_literal, TT_OverloadedOperator);
+  EXPECT_TOKEN(Tokens[4], tok::identifier, TT_OverloadedOperator);
+  EXPECT_TOKEN(Tokens[5], tok::l_paren, TT_OverloadedOperatorLParen);
----------------
owenpan wrote:
> We need/should not annotate the suffix.
Unless I change the logic in `rParenEndsCast`, the suffix does need to be an OverloadedOperator, since it goes off of the token immediately before left paren (https://reviews.llvm.org/D134853#3822842)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134853/new/

https://reviews.llvm.org/D134853



More information about the cfe-commits mailing list