blob: 62388915a26dd08f2a2ff1dc477c321ba0c0f39e [file] [log] [blame]
Chris Lattner3b427b32007-10-11 00:18:28 +00001// RUN: clang -fsyntax-only -verify %s
Ted Kremenek9b3d3a92007-08-29 18:06:12 +00002
3int foo(float x, float y) {
4 return x == y; // expected-warning {{comparing floating point with ==}}
5}
6
7int bar(float x, float y) {
8 return x != y; // expected-warning {{comparing floating point with ==}}
Ted Kremenek9f3d9422007-09-26 20:14:22 +00009}
Ted Kremenek6a261552007-10-29 16:40:01 +000010
11int qux(float x) {
12 return x == x; // no-warning
13}