diff options
Diffstat (limited to 'clang/test/CXX/drs/dr2406.cpp')
-rw-r--r-- | clang/test/CXX/drs/dr2406.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/clang/test/CXX/drs/dr2406.cpp b/clang/test/CXX/drs/dr2406.cpp deleted file mode 100644 index 0ab198e..0000000 --- a/clang/test/CXX/drs/dr2406.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// RUN: %clang_cc1 -x c++ %s -verify - -// dr2406: 5 - -void fallthrough(int n) { - void g(), h(), i(); - switch (n) { - case 1: - case 2: - g(); - [[fallthrough]]; - case 3: // warning on fallthrough discouraged - do { - [[fallthrough]]; // expected-error {{fallthrough annotation does not directly precede switch label}} - } while (false); - case 6: - do { - [[fallthrough]]; // expected-error {{fallthrough annotation does not directly precede switch label}} - } while (n); - case 7: - while (false) { - [[fallthrough]]; // expected-error {{fallthrough annotation does not directly precede switch label}} - } - case 5: - h(); - case 4: // implementation may warn on fallthrough - i(); - [[fallthrough]]; // expected-error {{fallthrough annotation does not directly precede switch label}} - } -} |