Require a class type to be complete before probing its conversion
functions for a switch condition's conversion to integral or
enumeration type.
llvm-svn: 89656
diff --git a/clang/test/SemaCXX/switch.cpp b/clang/test/SemaCXX/switch.cpp
index 2f2f2a9..003d5b8 100644
--- a/clang/test/SemaCXX/switch.cpp
+++ b/clang/test/SemaCXX/switch.cpp
@@ -33,3 +33,10 @@
switch (B()) { // expected-error{{multiple conversions}}
}
}
+
+struct C; // expected-note{{forward declaration}}
+
+void x3(C &c) {
+ switch (c) { // expected-error{{incomplete class type}}
+ }
+}