Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-format] Correctly annotate operator free function call
The annotator correctly annotates an overloaded operator call when called as a member function, like `x.operator+(y)`, however, when called as a free function, like `operator+(x, y)`, the annotator assumed it was an overloaded operator function *declaration*, instead of a call. This patch allows for a free function call to correctly be annotated as a call, but only if the current like cannot be a declaration, usually within the bodies of a function. Fixes #49973 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay, Nuullll Differential Revision: https://reviews.llvm.org/D153798
- Loading branch information
Showing
3 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters