aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/debug-info-switch-fallthrough.c
blob: 36ac371d8270b7bb5875fdb3c531aec1fdad4020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN:  %clang_cc1 -triple x86_64-apple-macosx11.0.0 -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck %s
// CHECK: ], !dbg !{{[0-9]+}}
// CHECK-EMPTY:
// CHECK-NEXT: {{.+}}
// CHECK-NEXT: br {{.+}}, !dbg !{{[0-9+]}}
// CHECK-EMPTY:
// CHECK-NEXT: {{.+}}
// CHECK-NEXT: br {{.+}}, !dbg ![[LOC:[0-9]+]]
void test(int num) {
  switch (num) {
  case 0:
    break;
  case 10: // CHECK: ![[LOC]] = !DILocation(line: [[@LINE]], column:{{.+}}, scope: {{.+}})
  default:
    break;
  }
}