[clang-tools-extra] r322692 - [clang-tidy] Fixing Fuchsia overloaded operator warning message
Julie Hockett via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 17 09:41:50 PST 2018
Author: juliehockett
Date: Wed Jan 17 09:41:50 2018
New Revision: 322692
URL: http://llvm.org/viewvc/llvm-project?rev=322692&view=rev
Log:
[clang-tidy] Fixing Fuchsia overloaded operator warning message
Updating Fuchsia overloaded operator warning message for clarity.
Differential Revision: https://reviews.llvm.org/D42120
Modified:
clang-tools-extra/trunk/clang-tidy/fuchsia/OverloadedOperatorCheck.cpp
clang-tools-extra/trunk/test/clang-tidy/fuchsia-overloaded-operator.cpp
Modified: clang-tools-extra/trunk/clang-tidy/fuchsia/OverloadedOperatorCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/fuchsia/OverloadedOperatorCheck.cpp?rev=322692&r1=322691&r2=322692&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/fuchsia/OverloadedOperatorCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/fuchsia/OverloadedOperatorCheck.cpp Wed Jan 17 09:41:50 2018
@@ -35,7 +35,7 @@ void OverloadedOperatorCheck::check(cons
SourceLocation Loc = D->getLocStart();
if (Loc.isValid())
- diag(Loc, "cannot overload %0") << D;
+ diag(Loc, "overloading %0 is disallowed") << D;
}
} // namespace fuchsia
Modified: clang-tools-extra/trunk/test/clang-tidy/fuchsia-overloaded-operator.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/fuchsia-overloaded-operator.cpp?rev=322692&r1=322691&r2=322692&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/fuchsia-overloaded-operator.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/fuchsia-overloaded-operator.cpp Wed Jan 17 09:41:50 2018
@@ -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
More information about the cfe-commits
mailing list