compute the integer width, not the memory width here. We want to know that
_Bool is 1 bit, not 8. This fixes an assertion on the testcase, which is
PR9304 and rdar://9045501.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126368 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/switch.cpp b/test/SemaCXX/switch.cpp
index fc13630..3882a1f 100644
--- a/test/SemaCXX/switch.cpp
+++ b/test/SemaCXX/switch.cpp
@@ -57,3 +57,10 @@
template void foo<B>();
template void foo<C>(); //expected-note {{in instantiation}}
}
+
+// PR9304 and rdar://9045501
+void click_check_header_sizes() {
+ switch (0 == 8) { // expected-warning {{switch condition has boolean value}}
+ case 0: ;
+ }
+}