Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-format] Fix parsing of
operator<() {}
(llvm#75144)
Fixes llvm#74876. During the parsing of `operator<(Foo&) {}`, there was no handling for the operator<, so it called `consumeToken()` again, causing the `AnnotationParser::Scopes` to have one additional left brace each time it tried to parse it, leaving it unbalanced. Because of this, in the following code: ```cpp class Foo { void operator<(Foo&) {} Foo& f; }; ``` The `&` in the reference member, was being interpreted as `TT_BinaryOperator` instead of `TT_PointerOrReference`.
- Loading branch information