summaryrefslogtreecommitdiff
path: root/test/SemaCXX/overloaded-operator.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:21:42 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-07-13 17:21:42 +0000
commit4ba675006b5a8edfc48b6a9bd3dcf54a70cc08f2 (patch)
tree48b44512b5db8ced345df4a1a56b5065cf2a14d9 /test/SemaCXX/overloaded-operator.cpp
parentd7279c4c177bca357ef96ff1379fd9bc420bfe83 (diff)
Diffstat (limited to 'test/SemaCXX/overloaded-operator.cpp')
-rw-r--r--test/SemaCXX/overloaded-operator.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/SemaCXX/overloaded-operator.cpp b/test/SemaCXX/overloaded-operator.cpp
index 3d737f4d30504..24f7f66129ebd 100644
--- a/test/SemaCXX/overloaded-operator.cpp
+++ b/test/SemaCXX/overloaded-operator.cpp
@@ -49,6 +49,13 @@ struct B {
}
};
+// we shouldn't see warnings about self-comparison,
+// this is a member function, we dunno what it'll do
+bool i(B b)
+{
+ return b == b;
+}
+
enum Enum1 { };
enum Enum2 { };
@@ -150,7 +157,7 @@ bool& operator,(X, Y);
void test_comma(X x, Y y) {
bool& b1 = (x, y);
- X& xr = (x, x);
+ X& xr = (x, x); // expected-warning {{expression result unused}}
}
struct Callable {