1// RUN: %check_clang_tidy %s fuchsia-overloaded-operator %t
2
3class A {
4public:
5 int operator+(int);
6 // CHECK-MESSAGES: [[@LINE-1]]:3: warning: overloading 'operator+' is disallowed
7};
8
9class B {
10public:
11 B &operator=(const B &Other);
12 // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: overloading 'operator=' is disallowed
13 B &operator=(B &&Other);
14 // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: overloading 'operator=' is disallowed
15};
16
17A operator-(const A &A1, const A &A2);
18// CHECK-MESSAGES: [[@LINE-1]]:1: warning: overloading 'operator-' is disallowed
19
20void operator delete(void*, void*) throw();
21// CHECK-MESSAGES: [[@LINE-1]]:1: warning: overloading 'operator delete' is disallowed
22
23auto x = []{};
24

source code of clang-tools-extra/test/clang-tidy/checkers/fuchsia/overloaded-operator.cpp