debug-info-ptr-to-member-function.cpp revision a4de17562d13d7a8188108243c4cfbd52f33229a
1// RUN: %clang_cc1 %s -triple x86_64-apple-darwin -debug-info-kind=limited -emit-llvm -o - | FileCheck -check-prefix=CHECK -check-prefix=DARWIN-X64 %s
2// RUN: %clang_cc1 %s -triple x86_64-pc-win32     -debug-info-kind=limited -emit-llvm -o - | FileCheck -check-prefix=CHECK -check-prefix=WIN32-X64 %s
3
4struct T {
5  int method();
6};
7
8void foo(int (T::*method)()) {}
9
10// A pointer to a member function is a pair of function- and this-pointer.
11// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type,
12// DARWIN-X64-SAME:      size: 128
13// WIN32-X64-SAME:       size: 64
14
15struct Incomplete;
16
17int (Incomplete::**bar)();
18// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type,
19// DARWIN-X64-SAME:           size: 128
20// WIN32-X64-NOT:             size:
21// CHECK-SAME:                extraData: {{.*}})
22