2015-10-08 12:24:12 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++11 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
|
2013-12-19 09:38:47 +08:00
|
|
|
// Test (r)value and CVR qualifiers on C++11 non-static member functions.
|
2013-12-19 05:48:18 +08:00
|
|
|
class A {
|
|
|
|
public:
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DISubprogram(name: "l",
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK-SAME: line: [[@LINE+4]]
|
|
|
|
// CHECK-SAME: type: ![[PLSR:[0-9]+]]
|
|
|
|
// CHECK-SAME: flags: DIFlagPublic | DIFlagPrototyped | DIFlagLValueReference,
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: ![[PLSR]] = !DISubroutineType(flags: DIFlagLValueReference, types: ![[ARGS:[0-9]+]])
|
2013-12-19 05:48:18 +08:00
|
|
|
void l() const &;
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK: ![[ARGS]] = !{null, ![[THIS:[0-9]+]]}
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: ![[THIS]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[CONST_A:[0-9]+]]
|
|
|
|
// CHECK: ![[CONST_A]] = !DIDerivedType(tag: DW_TAG_const_type
|
|
|
|
// CHECK: !DISubprogram(name: "r"
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK-SAME: line: [[@LINE+4]]
|
|
|
|
// CHECK-SAME: type: ![[PRSR:[0-9]+]]
|
|
|
|
// CHECK-SAME: flags: DIFlagPublic | DIFlagPrototyped | DIFlagRValueReference,
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: ![[PRSR]] = !DISubroutineType(flags: DIFlagRValueReference, types: ![[ARGS]])
|
2013-12-19 05:48:18 +08:00
|
|
|
void r() const &&;
|
|
|
|
};
|
|
|
|
|
|
|
|
void g() {
|
|
|
|
A a;
|
|
|
|
// The type of pl is "void (A::*)() const &".
|
2015-08-01 02:59:37 +08:00
|
|
|
// CHECK: !DILocalVariable(name: "pl",
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK-SAME: line: [[@LINE+3]]
|
|
|
|
// CHECK-SAME: type: ![[PL:[0-9]+]]
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PLSR]]
|
2013-12-19 05:48:18 +08:00
|
|
|
auto pl = &A::l;
|
|
|
|
|
2015-08-01 02:59:37 +08:00
|
|
|
// CHECK: !DILocalVariable(name: "pr",
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK-SAME: line: [[@LINE+3]]
|
|
|
|
// CHECK-SAME: type: ![[PR:[0-9]+]]
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PRSR]]
|
2013-12-19 05:48:18 +08:00
|
|
|
auto pr = &A::r;
|
|
|
|
}
|