forked from OSchip/llvm-project
Added to test case for "self-comparison check" uses of relation operators: x < x and x > x
should emit warnings. llvm-svn: 43451
This commit is contained in:
parent
e451eae8d7
commit
5d18ce750a
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue