Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Sema / warn-unreachable-fallthrough.c
blobe048a9e7e612fd20001293be411c8a2d338cf85d
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c2x -Wunreachable-code-fallthrough %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c2x -Wunreachable-code %s
3 // RUN: %clang_cc1 -fsyntax-only -verify=code -std=c2x -Wunreachable-code -Wno-unreachable-code-fallthrough %s
4 // RUN: %clang_cc1 -fsyntax-only -verify -std=c2x -Wno-unreachable-code -Wunreachable-code-fallthrough %s
6 int n;
7 void f(void){
8 switch (n){
9 [[fallthrough]]; // expected-warning{{fallthrough annotation in unreachable code}}
10 // code-warning@-1{{never be executed}}
11 case 1:;