summaryrefslogtreecommitdiff
path: root/test/Sema/compare.c
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2017-09-19 21:40:41 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2017-09-19 21:40:41 +0000
commita37dbcc7518cfee17269d0322ebb88622ba82bfb (patch)
treeadec3729d48fc3542e4276fbb4ea1f200abb3110 /test/Sema/compare.c
parent7a6944054dfa28e77dc0b930f23ab967de13e527 (diff)
downloadclang-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.c53
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;
}