[clang-format] Correctly annotate UDLs as OverloadedOperator
authorEmilia Dreamer <emilia@rymiel.space>
Thu, 29 Sep 2022 07:10:47 +0000 (10:10 +0300)
committerEmilia Dreamer <emilia@rymiel.space>
Tue, 25 Oct 2022 17:11:52 +0000 (20:11 +0300)
commitdce5bb9a6f89b18366c6f27aeb435a6e48e85639
treefea8cb507c53fbf91f3450434bf47a43740a37ba
parent01b8140d3aac50ad4c00246bddab8646a61016ed
[clang-format] Correctly annotate UDLs as OverloadedOperator

While the opening parenthesis of an user-defined literal operator was
correctly annotated as OverloadedOperatorLParen, the "" and its suffix
wasn't annotated as OverloadedOperator.

Fixes https://github.com/llvm/llvm-project/issues/58035

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