diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2017-09-19 21:40:41 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2017-09-19 21:40:41 +0000 |
commit | a37dbcc7518cfee17269d0322ebb88622ba82bfb (patch) | |
tree | adec3729d48fc3542e4276fbb4ea1f200abb3110 /test/Sema/compare.c | |
parent | 7a6944054dfa28e77dc0b930f23ab967de13e527 (diff) | |
download | clang-a37dbcc7518cfee17269d0322ebb88622ba82bfb.tar.gz |
Revert "[Sema] Move some stuff into -Wtautological-unsigned-enum-zero-compare"
This reverts commit r313677.
Buildbots fail with assertion failure
Failing Tests (7):
Clang :: Analysis/null-deref-ps.c
Clang :: CodeGen/enum.c
Clang :: Sema/compare.c
Clang :: Sema/outof-range-constant-compare.c
Clang :: Sema/tautological-unsigned-enum-zero-compare.c
Clang :: Sema/tautological-unsigned-zero-compare.c
Clang :: SemaCXX/compare.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/compare.c')
-rw-r--r-- | test/Sema/compare.c | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/test/Sema/compare.c b/test/Sema/compare.c index 97586a7cc0..ae261432dc 100644 --- a/test/Sema/compare.c +++ b/test/Sema/compare.c @@ -308,59 +308,8 @@ int rdar8414119_bar(unsigned x) { int rdar8511238() { enum A { A_foo, A_bar }; enum A a; - - if (a == 0) - return 0; - if (a != 0) - return 0; if (a < 0) // expected-warning {{comparison of unsigned enum expression < 0 is always false}} - return 0; - if (a <= 0) - return 0; - if (a > 0) - return 0; - if (a >= 0) // expected-warning {{comparison of unsigned enum expression >= 0 is always true}} - return 0; - - if (0 == a) - return 0; - if (0 != a) - return 0; - if (0 < a) - return 0; - if (0 <= a) // expected-warning {{comparison of 0 <= unsigned enum expression is always true}} - return 0; - if (0 > a) // expected-warning {{comparison of 0 > unsigned enum expression is always false}} - return 0; - if (0 >= a) - return 0; - - if (a == 0U) - return 0; - if (a != 0U) - return 0; - if (a < 0U) // expected-warning {{comparison of unsigned enum expression < 0 is always false}} - return 0; - if (a <= 0U) - return 0; - if (a > 0U) - return 0; - if (a >= 0U) // expected-warning {{comparison of unsigned enum expression >= 0 is always true}} - return 0; - - if (0U == a) - return 0; - if (0U != a) - return 0; - if (0U < a) - return 0; - if (0U <= a) // expected-warning {{comparison of 0 <= unsigned enum expression is always true}} - return 0; - if (0U > a) // expected-warning {{comparison of 0 > unsigned enum expression is always false}} - return 0; - if (0U >= a) - return 0; - + return 0; return 20; } |