summaryrefslogtreecommitdiff
path: root/test/Analysis/enum.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-26 19:24:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-26 19:24:09 +0000
commitf0c55418e2b09eaab37c820d3756cc1b4584d084 (patch)
tree9263bf60f263bb5a7aaa4d2c1be43e5fc4d942e0 /test/Analysis/enum.cpp
parent583e75cce441388bc562fa225d23499261a0091e (diff)
Notes
Diffstat (limited to 'test/Analysis/enum.cpp')
-rw-r--r--test/Analysis/enum.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Analysis/enum.cpp b/test/Analysis/enum.cpp
index e26b8f00d98c..b561e65ac86e 100644
--- a/test/Analysis/enum.cpp
+++ b/test/Analysis/enum.cpp
@@ -24,3 +24,16 @@ void testCasting(int i) {
clang_analyzer_eval(j == 0); // expected-warning{{FALSE}}
}
}
+
+enum class EnumBool : bool {
+ F = false,
+ T = true
+};
+
+bool testNoCrashOnSwitchEnumBool(EnumBool E) {
+ switch (E) {
+ case EnumBool::F:
+ return false;
+ }
+ return true;
+}