]> granicus.if.org Git - clang/commitdiff
Updated test case to flag about comparisons against constants. We may
authorTed Kremenek <kremenek@apple.com>
Tue, 13 Nov 2007 19:18:22 +0000 (19:18 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 13 Nov 2007 19:18:22 +0000 (19:18 +0000)
invert this case (i.e., not flag a warning) in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44059 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/floating-point-compare.c

index d8eff58e9225d65f57f14585d681d97fc033a453..ac8fed2d62e36dc892f60482bade3b7e2d3d7c2f 100644 (file)
@@ -13,7 +13,7 @@ int qux(float x) {
 }
 
 int baz(float x) {
-       return x == 0.0; // no-warning
+       return x == 0.0; // expected-warning {{comparing}}
 }
 
 int taz(float x) {