[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / debug-info-method.cpp
blobaf7103e57528f7395d1d737beb40c74a60c82c7c
1 // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -debug-info-kind=limited %s -o - | FileCheck %s
2 // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type
3 // CHECK: ![[A:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "A",{{.*}} identifier: "_ZTS1A")
4 // CHECK: !DISubprogram(name: "foo", linkageName: "_ZN1A3fooEiS_3$_0"
5 // CHECK-SAME: DIFlagProtected
6 // CHECK: ![[THISTYPE:[0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[A]]
7 // CHECK-SAME: DIFlagArtificial
8 // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[MEMFUNTYPE:[0-9]+]]
9 // CHECK: ![[MEMFUNTYPE]] = !DISubroutineType({{(cc: DW_CC_BORLAND_thiscall, )?}}types: ![[MEMFUNARGS:[0-9]+]])
10 // CHECK: ![[MEMFUNARGS]] = {{.*}}, ![[THISTYPE]],
11 // CHECK: !DILocalVariable(name: "this", arg: 1
12 // CHECK: !DILocalVariable(arg: 2
13 // CHECK: !DILocalVariable(arg: 3
14 // CHECK: !DILocalVariable(arg: 4
15 union {
16 int a;
17 float b;
18 } u;
20 class A {
21 protected:
22 void foo(int, A, decltype(u));
23 void bar();
24 };
26 void A::foo(int, A, decltype(u)) {
29 A a;
31 int A::*x = 0;
32 int (A::*y)(int) = 0;
34 void A::bar() { foo(0, *this, u); }