Chris Lattner | 3b427b3 | 2007-10-11 00:18:28 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
Ted Kremenek | 9b3d3a9 | 2007-08-29 18:06:12 +0000 | [diff] [blame] | 2 | |
| 3 | int foo(float x, float y) { |
| 4 | return x == y; // expected-warning {{comparing floating point with ==}} |
| 5 | } |
| 6 | |
| 7 | int bar(float x, float y) { |
| 8 | return x != y; // expected-warning {{comparing floating point with ==}} |
Ted Kremenek | 9f3d942 | 2007-09-26 20:14:22 +0000 | [diff] [blame] | 9 | } |
Ted Kremenek | 6a26155 | 2007-10-29 16:40:01 +0000 | [diff] [blame] | 10 | |
| 11 | int qux(float x) { |
| 12 | return x == x; // no-warning |
| 13 | } |