2007-10-11 08:18:28 +08:00
|
|
|
// RUN: clang -fsyntax-only -verify %s
|
2007-08-30 02:06:12 +08:00
|
|
|
|
|
|
|
int foo(float x, float y) {
|
|
|
|
return x == y; // expected-warning {{comparing floating point with ==}}
|
|
|
|
}
|
|
|
|
|
|
|
|
int bar(float x, float y) {
|
|
|
|
return x != y; // expected-warning {{comparing floating point with ==}}
|
2007-09-27 04:14:22 +08:00
|
|
|
}
|
2007-10-30 00:40:01 +08:00
|
|
|
|
|
|
|
int qux(float x) {
|
|
|
|
return x == x; // no-warning
|
|
|
|
}
|