12 lines · cpp
1// RUN: %clang -fsyntax-only -std=c++20 -Xclang -verify %s2 3void Func(int x) {4 switch (x) {5 [[likely]] case 0:6 case 1: 7 int i = 3; // expected-note {{jump bypasses variable initialization}}8 case 2: // expected-error {{cannot jump from switch statement to this case label}}9 break;10 }11}12