2017-12-23 00:52:25 +08:00
|
|
|
// RUN: %check_clang_tidy %s fuchsia-overloaded-operator %t
|
|
|
|
|
|
|
|
class A {
|
|
|
|
public:
|
|
|
|
int operator+(int);
|
2018-01-18 01:41:50 +08:00
|
|
|
// CHECK-MESSAGES: [[@LINE-1]]:3: warning: overloading 'operator+' is disallowed
|
2017-12-23 00:52:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class B {
|
|
|
|
public:
|
|
|
|
B &operator=(const B &Other);
|
2018-01-18 01:41:50 +08:00
|
|
|
// CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: overloading 'operator=' is disallowed
|
2017-12-23 00:52:25 +08:00
|
|
|
B &operator=(B &&Other);
|
2018-01-18 01:41:50 +08:00
|
|
|
// CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: overloading 'operator=' is disallowed
|
2017-12-23 00:52:25 +08:00
|
|
|
};
|
|
|
|
|
2017-12-23 03:15:05 +08:00
|
|
|
A operator-(const A &A1, const A &A2);
|
2018-01-18 01:41:50 +08:00
|
|
|
// CHECK-MESSAGES: [[@LINE-1]]:1: warning: overloading 'operator-' is disallowed
|
2018-01-04 06:10:11 +08:00
|
|
|
|
|
|
|
void operator delete(void*, void*) throw();
|
2018-01-18 01:41:50 +08:00
|
|
|
// CHECK-MESSAGES: [[@LINE-1]]:1: warning: overloading 'operator delete' is disallowed
|