aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Sema/self-comparison.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Sema/self-comparison.c b/test/Sema/self-comparison.c
index 450673c69c..023afb7926 100644
--- a/test/Sema/self-comparison.c
+++ b/test/Sema/self-comparison.c
@@ -8,10 +8,18 @@ int foo2(int x) {
return (x) != (((x))); // expected-warning {{self-comparison always results}}
}
+int qux(int x) {
+ return x < x; // expected-warning {{self-comparison}}
+}
+
+int qux2(int x) {
+ return x > x; // expected-warning {{self-comparison}}
+}
+
int bar(float x) {
return x == x; // no-warning
}
int bar2(float x) {
return x != x; // no-warning
-} \ No newline at end of file
+}