[clang-format] Correctly annotate overloaded operator function name
authorOwen Pan <owenpiano@gmail.com>
Sat, 15 Jul 2023 07:45:18 +0000 (00:45 -0700)
committerOwen Pan <owenpiano@gmail.com>
Sat, 15 Jul 2023 18:02:31 +0000 (11:02 -0700)
commitcc2ff02eadede988ab890b2d0f428bd1531a3803
treeb0b1b01ae5598ffd47786a2696c9fcbb3d17ebe7
parent33fe4dc91e34c25ce29d39e20bdee0dfc7d25acb
[clang-format] Correctly annotate overloaded operator function name

The operator keyword preceded by a template closer should be annotated as
TT_FunctionDeclarationName.

Fixes #63879.

Differential Revision: https://reviews.llvm.org/D155358
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/TokenAnnotatorTest.cpp