Elizabeth Andrews | 878a24e | 2019-12-03 14:20:52 -0800 | [diff] [blame] | 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; | ||||
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 | }; |