blob: 450673c69c327d898af33082b72673efdf9a7377 [file] [log] [blame]
Ted Kremenek3ca0bf22007-10-29 16:58:49 +00001// RUN: clang -fsyntax-only -verify %s
2
3int foo(int x) {
4 return x == x; // expected-warning {{self-comparison always results}}
5}
6
7int foo2(int x) {
8 return (x) != (((x))); // expected-warning {{self-comparison always results}}
9}
10
11int bar(float x) {
12 return x == x; // no-warning
13}
14
15int bar2(float x) {
16 return x != x; // no-warning
17}