@@ -11159,10 +11159,8 @@ TEST_F(FormatTest, UnderstandsOverloadedOperators) {
11159
11159
verifyFormat("void f() { a.operator*(b & b); }");
11160
11160
verifyFormat("void f() { a->operator&(a * b); }");
11161
11161
verifyFormat("void f() { NS::a.operator+(*b * *b); }");
11162
- // TODO: Calling an operator as a non-member function is hard to distinguish.
11163
- // https://llvm.org/PR50629
11164
- // verifyFormat("void f() { operator*(a & a); }");
11165
- // verifyFormat("void f() { operator&(a, b * b); }");
11162
+ verifyFormat("void f() { operator*(a & a); }");
11163
+ verifyFormat("void f() { operator&(a, b * b); }");
11166
11164
11167
11165
verifyFormat("void f() { return operator()(x) * b; }");
11168
11166
verifyFormat("void f() { return operator[](x) * b; }");
@@ -16551,9 +16549,8 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
16551
16549
verifyFormat("static_assert (sizeof (char) == 1, \"Impossible!\");", Space);
16552
16550
verifyFormat("int f () throw (Deprecated);", Space);
16553
16551
verifyFormat("typedef void (*cb) (int);", Space);
16554
- // FIXME these tests regressed behaviour.
16555
- // verifyFormat("T A::operator() ();", Space);
16556
- // verifyFormat("X A::operator++ (T);", Space);
16552
+ verifyFormat("T A::operator() ();", Space);
16553
+ verifyFormat("X A::operator++ (T);", Space);
16557
16554
verifyFormat("auto lambda = [] () { return 0; };", Space);
16558
16555
verifyFormat("int x = int (y);", Space);
16559
16556
verifyFormat("#define F(...) __VA_OPT__ (__VA_ARGS__)", Space);
@@ -16612,8 +16609,7 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
16612
16609
verifyFormat("int f() throw (Deprecated);", SomeSpace);
16613
16610
verifyFormat("typedef void (*cb) (int);", SomeSpace);
16614
16611
verifyFormat("T A::operator()();", SomeSpace);
16615
- // FIXME these tests regressed behaviour.
16616
- // verifyFormat("X A::operator++ (T);", SomeSpace);
16612
+ verifyFormat("X A::operator++ (T);", SomeSpace);
16617
16613
verifyFormat("int x = int (y);", SomeSpace);
16618
16614
verifyFormat("auto lambda = []() { return 0; };", SomeSpace);
16619
16615
@@ -16671,9 +16667,8 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
16671
16667
SpaceFuncDecl);
16672
16668
verifyFormat("int f () throw(Deprecated);", SpaceFuncDecl);
16673
16669
verifyFormat("typedef void (*cb)(int);", SpaceFuncDecl);
16674
- // FIXME these tests regressed behaviour.
16675
- // verifyFormat("T A::operator() ();", SpaceFuncDecl);
16676
- // verifyFormat("X A::operator++ (T);", SpaceFuncDecl);
16670
+ verifyFormat("T A::operator()();", SpaceFuncDecl);
16671
+ verifyFormat("X A::operator++(T);", SpaceFuncDecl);
16677
16672
verifyFormat("T A::operator()() {}", SpaceFuncDecl);
16678
16673
verifyFormat("auto lambda = []() { return 0; };", SpaceFuncDecl);
16679
16674
verifyFormat("int x = int(y);", SpaceFuncDecl);
@@ -16710,7 +16705,7 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
16710
16705
verifyFormat("typedef void (*cb)(int);", SpaceFuncDef);
16711
16706
verifyFormat("T A::operator()();", SpaceFuncDef);
16712
16707
verifyFormat("X A::operator++(T);", SpaceFuncDef);
16713
- // verifyFormat("T A::operator() () {}", SpaceFuncDef);
16708
+ verifyFormat("T A::operator()() {}", SpaceFuncDef);
16714
16709
verifyFormat("auto lambda = [] () { return 0; };", SpaceFuncDef);
16715
16710
verifyFormat("int x = int(y);", SpaceFuncDef);
16716
16711
verifyFormat("M(std::size_t R, std::size_t C) : C(C), data(R) {}",
@@ -16797,7 +16792,7 @@ TEST_F(FormatTest, ConfigurableSpaceBeforeParens) {
16797
16792
verifyFormat("int f() throw (Deprecated);", SomeSpace2);
16798
16793
verifyFormat("typedef void (*cb) (int);", SomeSpace2);
16799
16794
verifyFormat("T A::operator()();", SomeSpace2);
16800
- // verifyFormat("X A::operator++ (T);", SomeSpace2);
16795
+ verifyFormat("X A::operator++ (T);", SomeSpace2);
16801
16796
verifyFormat("int x = int (y);", SomeSpace2);
16802
16797
verifyFormat("auto lambda = []() { return 0; };", SomeSpace2);
16803
16798
0 commit comments