aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn-unique-enum.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-09-18 00:41:42 +0000
committerTed Kremenek <kremenek@apple.com>2012-09-18 00:41:42 +0000
commit43f8c40b05482894d94a8779a5ccd0f9a35420f3 (patch)
treed7eaf449b318d159dc3e468eed8bd7ee5caa6243 /test/SemaCXX/warn-unique-enum.cpp
parentf224fb5de15e10cecd2d87fee73b0e39b503d924 (diff)
Per discussion on cfe-dev, remove -Wunique-enums entirely. There
is no compelling argument that this is a generally useful warning, and imposes a strong stylistic argument on code beyond what it was intended to find warnings in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/warn-unique-enum.cpp')
-rw-r--r--test/SemaCXX/warn-unique-enum.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/test/SemaCXX/warn-unique-enum.cpp b/test/SemaCXX/warn-unique-enum.cpp
deleted file mode 100644
index 59a1278071..0000000000
--- a/test/SemaCXX/warn-unique-enum.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -Wunique-enum
-enum A { A1 = 1, A2 = 1, A3 = 1 }; // expected-warning {{all elements of 'A' are initialized with literals to value 1}} \
-// expected-note {{initialize the last element with the previous element to silence this warning}}
-enum { B1 = 1, B2 = 1, B3 = 1 }; // no warning
-enum C { // expected-warning {{all elements of 'C' are initialized with literals to value 1}}
- C1 = true,
- C2 = true // expected-note {{initialize the last element with the previous element to silence this warning}}
-};
-enum D { D1 = 5, D2 = 5L, D3 = 5UL, D4 = 5LL, D5 = 5ULL }; // expected-warning {{all elements of 'D' are initialized with literals to value 5}} \
-// expected-note {{initialize the last element with the previous element to silence this warning}}
-
-// Don't warn on enums with less than 2 elements.
-enum E { E1 = 4 };
-enum F { F1 };
-enum G {};
-
-// Don't warn when integer literals do not initialize the elements.
-enum H { H1 = 4, H_MAX = H1, H_MIN = H1 };
-enum I { I1 = H1, I2 = 4 };
-enum J { J1 = 4, J2 = I2 };
-enum K { K1, K2, K3, K4 };
-
-// Don't crash or warn on this one.
-// rdar://11875995
-enum L {
- L1 = 0x8000000000000000ULL, L2 = 0x0000000000000001ULL
-};