brintos

brintos / llvm-project-archived public Read only

0
0
Text · 314 B · 23c8e0e Raw
15 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 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};15