[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaTemplate / non-integral-switch-cond.cpp
blob23c8e0ef8d4e11e981c8fedb58c9c40e8087a534
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 struct NOT_AN_INTEGRAL_TYPE {};
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;