brintos

brintos / llvm-project-archived public Read only

0
0
Text · 597 B · e048a9e Raw
14 lines · c
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c2x -Wunreachable-code-fallthrough %s2// RUN: %clang_cc1 -fsyntax-only -verify -std=c2x -Wunreachable-code %s3// RUN: %clang_cc1 -fsyntax-only -verify=code -std=c2x -Wunreachable-code -Wno-unreachable-code-fallthrough %s4// RUN: %clang_cc1 -fsyntax-only -verify -std=c2x -Wno-unreachable-code -Wunreachable-code-fallthrough %s5 6int n;7void f(void){8     switch (n){9         [[fallthrough]]; // expected-warning{{fallthrough annotation in unreachable code}}10                          // code-warning@-1{{never be executed}}11         case 1:;12     }13}14