1 // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s
3 extern int printf(const char*, ...);
5 // CHECK-LABEL: @_Z4testi(
11 // CHECK: call noundef i32 (ptr, ...) @_Z6printfPKcz
12 case 6: do { case 5: printf("bad\n"); } while (0);
23 // CHECK-LABEL: @_Z10other_testv(
33 struct X
{ X(); ~X(); };
38 // CHECK-LABEL: @_Z13nested_scopesv(
39 void nested_scopes() {
42 // CHECK-NOT: @_Z9dont_callv(
47 // CHECK: call {{.*}} @_ZN1XC1Ev(
48 // CHECK: call {{.*}} @_Z3foov(
49 // CHECK-NOT: call {{.*}} @_Z3foov(
50 // CHECK: call {{.*}} @_ZN1XD1Ev(
53 // CHECK: call {{.*}} @_ZN1XC1Ev(
54 // CHECK: call {{.*}} @_Z3foov(
55 // CHECK: call {{.*}} @_ZN1XD1Ev(
58 // CHECK: call {{.*}} @_ZN1XC1Ev(
59 // CHECK: call {{.*}} @_Z3foov(
60 // CHECK: call {{.*}} @_ZN1XD1Ev(
66 // CHECK-LABEL: @_Z17scope_fallthroughv(
67 void scope_fallthrough() {
69 // CHECK: call {{.*}} @_ZN1XC1Ev(
70 // CHECK-NOT: call {{.*}} @_Z3foov(
71 // CHECK: call {{.*}} @_ZN1XD1Ev(
73 // CHECK: call {{.*}} @_Z3foov(
79 // CHECK-LABEL: @_Z12hidden_breakb(
80 void hidden_break(bool b
) {
86 // CHECK: call {{.*}} @_Z3foov(
92 // CHECK-LABEL: @_Z10hidden_varv(
95 // CHECK: %[[N:.*]] = alloca i32
97 // CHECK: store i32 0, ptr %[[N]]
98 // CHECK: load i32, ptr %[[N]]
100 default: n
= 0; return n
;
104 // CHECK-LABEL: @_Z13case_in_labelv(
105 void case_in_label() {
107 switch (1) case 1: foo
: case 0: goto foo
;