This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE322692: [clang-tidy] Fixing Fuchsia overloaded operator
warning message (authored by juliehockett, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D42120?vs=129998&id=130205#toc
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D42120
Files:
clang-tidy/fuchsia/OverloadedOperatorCheck.cpp
test/clang-tidy/fuchsia-overloaded-operator.cpp
Index: clang-tidy/fuchsia/OverloadedOperatorCheck.cpp
===================================================================
--- clang-tidy/fuchsia/OverloadedOperatorCheck.cpp
+++ clang-tidy/fuchsia/OverloadedOperatorCheck.cpp
@@ -35,7 +35,7 @@
SourceLocation Loc = D->getLocStart();
if (Loc.isValid())
- diag(Loc, "cannot overload %0") << D;
+ diag(Loc, "overloading %0 is disallowed") << D;
}
} // namespace fuchsia
Index: test/clang-tidy/fuchsia-overloaded-operator.cpp
===================================================================
--- test/clang-tidy/fuchsia-overloaded-operator.cpp
+++ test/clang-tidy/fuchsia-overloaded-operator.cpp
@@ -3,19 +3,19 @@
class A {
public:
int operator+(int);
- // CHECK-MESSAGES: [[@LINE-1]]:3: warning: cannot overload 'operator+'
[fuchsia-overloaded-operator]
+ // CHECK-MESSAGES: [[@LINE-1]]:3: warning: overloading 'operator+' is
disallowed
};
class B {
public:
B &operator=(const B &Other);
- // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: cannot overload 'operator='
[fuchsia-overloaded-operator]
+ // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: overloading 'operator=' is
disallowed
B &operator=(B &&Other);
- // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: cannot overload 'operator='
[fuchsia-overloaded-operator]
+ // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: overloading 'operator=' is
disallowed
};
A operator-(const A &A1, const A &A2);
-// CHECK-MESSAGES: [[@LINE-1]]:1: warning: cannot overload 'operator-'
[fuchsia-overloaded-operator]
+// CHECK-MESSAGES: [[@LINE-1]]:1: warning: overloading 'operator-' is
disallowed
void operator delete(void*, void*) throw();
-// CHECK-MESSAGES: [[@LINE-1]]:1: warning: cannot overload 'operator delete'
[fuchsia-overloaded-operator]
+// CHECK-MESSAGES: [[@LINE-1]]:1: warning: overloading 'operator delete' is
disallowed
Index: clang-tidy/fuchsia/OverloadedOperatorCheck.cpp
===================================================================
--- clang-tidy/fuchsia/OverloadedOperatorCheck.cpp
+++ clang-tidy/fuchsia/OverloadedOperatorCheck.cpp
@@ -35,7 +35,7 @@
SourceLocation Loc = D->getLocStart();
if (Loc.isValid())
- diag(Loc, "cannot overload %0") << D;
+ diag(Loc, "overloading %0 is disallowed") << D;
}
} // namespace fuchsia
Index: test/clang-tidy/fuchsia-overloaded-operator.cpp
===================================================================
--- test/clang-tidy/fuchsia-overloaded-operator.cpp
+++ test/clang-tidy/fuchsia-overloaded-operator.cpp
@@ -3,19 +3,19 @@
class A {
public:
int operator+(int);
- // CHECK-MESSAGES: [[@LINE-1]]:3: warning: cannot overload 'operator+' [fuchsia-overloaded-operator]
+ // CHECK-MESSAGES: [[@LINE-1]]:3: warning: overloading 'operator+' is disallowed
};
class B {
public:
B &operator=(const B &Other);
- // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: cannot overload 'operator=' [fuchsia-overloaded-operator]
+ // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: overloading 'operator=' is disallowed
B &operator=(B &&Other);
- // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: cannot overload 'operator=' [fuchsia-overloaded-operator]
+ // CHECK-MESSAGES-NOT: [[@LINE-1]]:3: warning: overloading 'operator=' is disallowed
};
A operator-(const A &A1, const A &A2);
-// CHECK-MESSAGES: [[@LINE-1]]:1: warning: cannot overload 'operator-' [fuchsia-overloaded-operator]
+// CHECK-MESSAGES: [[@LINE-1]]:1: warning: overloading 'operator-' is disallowed
void operator delete(void*, void*) throw();
-// CHECK-MESSAGES: [[@LINE-1]]:1: warning: cannot overload 'operator delete' [fuchsia-overloaded-operator]
+// CHECK-MESSAGES: [[@LINE-1]]:1: warning: overloading 'operator delete' is disallowed
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits