| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| return x == x; // expected-warning {{self-comparison always results}} |
| return (x) != (((x))); // expected-warning {{self-comparison always results}} |
| return x < x; // expected-warning {{self-comparison}} |
| return x > x; // expected-warning {{self-comparison}} |
| return x == x; // no-warning |
| return x != x; // no-warning |
| // Motivated by <rdar://problem/6703892>, self-comparisons of enum constants |
| // should not be warned about. These can be expanded from macros, and thus |
| // are usually deliberate. |
| return A == A; // no-warning |