1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 
3 struct NOT_AN_INTEGRAL_TYPE {};
4 
5 template <typename T>
6 struct foo {
7   NOT_AN_INTEGRAL_TYPE Bad;
runfoo8   void run() {
9     switch (Bad) { // expected-error {{statement requires expression of integer type ('NOT_AN_INTEGRAL_TYPE' invalid)}}
10     case 0:
11       break;
12     }
13   }
14 };
15