[Reland][Runtimes] Merge 'compile_commands.json' files from runtimes build (#116303)
[llvm-project.git] / clang / test / CodeGenCXX / debug-info-explicit-cast.cpp
blob028a7760d8b98821c532a5e7009cf716cf678c0d
1 // RUN: %clangxx -c -target %itanium_abi_triple -g %s -emit-llvm -S -o - | FileCheck %s
2 // RUN: %clangxx -c -target %ms_abi_triple -g %s -emit-llvm -S -o - | FileCheck %s
4 struct Foo {
5 int A;
6 Foo() : A(1){};
7 };
9 struct Bar {
10 int B;
11 Bar() : B(2){};
14 struct Baz {
15 int C;
16 Baz() : C(3){};
19 struct Qux {
20 int d() { return 4; }
21 Qux() {};
24 struct Quux {
25 int E;
26 Quux() : E(5){};
29 typedef int(Qux::*TD)();
30 typedef int(Qux::*TD1)();
31 int Val = reinterpret_cast<Baz *>(0)->C;
32 int main() {
33 Bar *PB = new Bar;
34 TD d = &Qux::d;
35 (void)reinterpret_cast<TD1>(d);
37 return reinterpret_cast<Foo *>(PB)->A + reinterpret_cast<Quux *>(0)->E;
40 // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "Foo",
41 // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "Bar",
42 // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "Baz",
43 // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "Qux",
44 // CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "Quux",
45 // CHECK-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "TD",
46 // CHECK-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "TD1",