summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/switch.c
blob: 8559e0dee3965ac19e0e5ffe5bea4e3fcdff0619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: clang -parse-ast-check %s

void f (int z) { 
  while (z) { 
    default: z--;   // expected-error {{statement not in switch}}
  } 
}

void foo(int X) {
  switch (X) {
  case 5000000000LL:  // expected-warning {{overflow}}
  case 42:
   ;
  }
}

OpenPOWER on IntegriCloud