25 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -emit-pch -o %t.a %s2// RUN: %clang_cc1 -std=c++11 -include-pch %t.a %s -ast-print -o - | FileCheck %s3 4#ifndef HEADER5#define HEADER6 7inline void test(int i) {8 switch (i) {9 case 1:10 // Notice that the NullStmt has two attributes.11 // CHECK: {{\[\[clang::fallthrough\]\] \[\[clang::fallthrough\]\]}}12 [[clang::fallthrough]] [[clang::fallthrough]];13 case 2:14 break;15 }16}17 18#else19 20void foo(void) {21 test(1);22}23 24#endif25