commit | 2551c1bbcdc412658b4c4d117fba0b1f708e1deb | [log] [tgz] |
---|---|---|
author | John McCall <rjmccall@apple.com> | Wed Oct 06 00:25:24 2010 +0000 |
committer | John McCall <rjmccall@apple.com> | Wed Oct 06 00:25:24 2010 +0000 |
tree | 3e606de9d0522635d71c4289b6f458b8136d41f2 | |
parent | f449926a018a937549ebbe8045293b42aae9d6fd [diff] [blame] |
Provide a slightly specialized diagnostic for tautological comparisons of an enum value. llvm-svn: 115725
diff --git a/clang/test/Sema/compare.c b/clang/test/Sema/compare.c index 2a6917e..5221b17 100644 --- a/clang/test/Sema/compare.c +++ b/clang/test/Sema/compare.c
@@ -305,3 +305,10 @@ #undef ZERO #undef CHECK +int rdar8511238() { + enum A { A_foo, A_bar }; + enum A a; + if (a < 0) // expected-warning {{comparison of unsigned enum expression < 0 is always false}} + return 0; + return 20; +}