diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-18 17:37:21 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-18 17:37:21 +0000 |
commit | b1885425c4adbb2baa09d90fe9c20d261759366e (patch) | |
tree | e5402957b39ec681f3e3edb77fa72a1f3e8cb52f /clang/test/SemaCXX/warn-enum-compare.cpp | |
parent | a59ef5795d884d39acd471cb71ee7ba93abc5e79 (diff) | |
download | bcm5719-llvm-b1885425c4adbb2baa09d90fe9c20d261759366e.tar.gz bcm5719-llvm-b1885425c4adbb2baa09d90fe9c20d261759366e.zip |
c: warn when an integer value comparison with an
integral expression have the obvious result.
Patch reviewed by John McCall off line.
// rdar://12202422
llvm-svn: 164143
Diffstat (limited to 'clang/test/SemaCXX/warn-enum-compare.cpp')
-rw-r--r-- | clang/test/SemaCXX/warn-enum-compare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/warn-enum-compare.cpp b/clang/test/SemaCXX/warn-enum-compare.cpp index 52639e70a80..68fa2ce3677 100644 --- a/clang/test/SemaCXX/warn-enum-compare.cpp +++ b/clang/test/SemaCXX/warn-enum-compare.cpp @@ -39,8 +39,8 @@ void test () { while (b == c); while (B1 == name1::B2); while (B2 == name2::B1); - while (x == AnonAA); - while (AnonBB == y); + while (x == AnonAA); // expected-warning {{comparison of literal 42 with expression of type 'Foo' is always false}} + while (AnonBB == y); // expected-warning {{comparison of literal 45 with expression of type 'Bar' is always false}} while (AnonAA == AnonAB); while (AnonAB == AnonBA); while (AnonBB == AnonAA); |