From f0c55418e2b09eaab37c820d3756cc1b4584d084 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 26 Apr 2017 19:24:09 +0000 Subject: Vendor import of clang trunk r301441: https://llvm.org/svn/llvm-project/cfe/trunk@301441 --- test/Analysis/enum.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/Analysis/enum.cpp') diff --git a/test/Analysis/enum.cpp b/test/Analysis/enum.cpp index e26b8f00d98ca..b561e65ac86ea 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; +} -- cgit v1.3