brintos

brintos / llvm-project-archived public Read only

0
0
Text · 360 B · 6ab6370 Raw
14 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -DUNREACHABLE=1 %s2// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -DUNREACHABLE=0 -Wimplicit-fallthrough %s3 4void fallthrough(int n) {5  switch (n) {6  case 1:7    if (UNREACHABLE)8      return;9    [[fallthrough]]; // expected-no-diagnostics, only checked when UNREACHABLE=010  case 2:11    break;12  }13}14