[Format] Fix incorrect pointer/reference detection
authorYilong Guo <yilong.guo@intel.com>
Thu, 17 Jun 2021 08:33:00 +0000 (09:33 +0100)
committermydeveloperday <mydeveloperday@gmail.com>
Thu, 17 Jun 2021 08:34:06 +0000 (09:34 +0100)
commit873308fd8c96a54f0024251425daac1b78f70119
tree2e25ce48fd919190df27bca5d5e3945d0359af29
parent9cca5c1391d637b5500ada646cf136ddb38254a3
[Format] Fix incorrect pointer/reference detection

https://llvm.org/PR50568

When an overloaded operator is called, its argument must be an
expression.

Before:
    void f() { a.operator()(a *a); }

After:
    void f() { a.operator()(a * a); }

Reviewed By: HazardyKnusperkeks, curdeius, MyDeveloperDay

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