aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/switch-implicit-fallthrough-regression.cpp
blob: aec3769e00e473f5e167620cad4f7d512141ee09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wimplicit-fallthrough %s

void f() {
  class C {
    void f(int x) {
      switch (x) {
        case 0:
          x++;
          [[clang::fallthrough]]; // expected-no-diagnostics
        case 1:
          x++;
          break;
      }
    }
  };
}