summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/switch.cpp
blob: b22adb749576a952320b7d700ae4bb3ba31fb7a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: clang-cc -fsyntax-only -verify %s

void test() {
  bool x = true;
  switch (x) { // expected-warning {{bool}}
    case 0:
      break;
  }

  int n = 3;
  switch (n && 1) { // expected-warning {{bool}}
    case 1:
      break;
  }
}
OpenPOWER on IntegriCloud