brintos

brintos / llvm-project-archived public Read only

0
0
Text · 711 B · 7f7a36e Raw
24 lines · cpp
1// RUN: %check_clang_tidy %s fuchsia-overloaded-operator %t2 3class A {4public:5  int operator+(int);6  // CHECK-MESSAGES: [[@LINE-1]]:3: warning: overloading 'operator+' is disallowed7};8 9class B {10public:11  B &operator=(const B &Other);12  // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: overloading 'operator=' is disallowed13  B &operator=(B &&Other);14  // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: overloading 'operator=' is disallowed15};16 17A operator-(const A &A1, const A &A2);18// CHECK-MESSAGES: [[@LINE-1]]:1: warning: overloading 'operator-' is disallowed19 20void operator delete(void*, void*) throw();21// CHECK-MESSAGES: [[@LINE-1]]:1: warning: overloading 'operator delete' is disallowed22 23auto x = []{};24