blob: 23c8e0ef8d4e11e981c8fedb58c9c40e8087a534 [file] [log] [blame]
Elizabeth Andrews878a24e2019-12-03 14:20:52 -08001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3struct NOT_AN_INTEGRAL_TYPE {};
4
5template <typename T>
6struct foo {
7 NOT_AN_INTEGRAL_TYPE Bad;
8 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};