diff options
Diffstat (limited to 'test/Analysis/enum.cpp')
-rw-r--r-- | test/Analysis/enum.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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; +} |