1*3459ce2eSDouglas Katzman // RUN: %clang_cc1 -std=c++11 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
20866acd3SAdrian Prantl // Test (r)value and CVR qualifiers on C++11 non-static member functions.
30630eb70SAdrian Prantl class A {
40630eb70SAdrian Prantl public:
59dd4e4e6SDuncan P. N. Exon Smith // CHECK: !DISubprogram(name: "l",
6f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME: line: [[@LINE+4]]
7f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME: type: ![[PLSR:[0-9]+]]
8f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME: flags: DIFlagPublic | DIFlagPrototyped | DIFlagLValueReference,
99dd4e4e6SDuncan P. N. Exon Smith // CHECK: ![[PLSR]] = !DISubroutineType(flags: DIFlagLValueReference, types: ![[ARGS:[0-9]+]])
100630eb70SAdrian Prantl void l() const &;
11f04be1fbSDuncan P. N. Exon Smith // CHECK: ![[ARGS]] = !{null, ![[THIS:[0-9]+]]}
129dd4e4e6SDuncan P. N. Exon Smith // CHECK: ![[THIS]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[CONST_A:[0-9]+]]
139dd4e4e6SDuncan P. N. Exon Smith // CHECK: ![[CONST_A]] = !DIDerivedType(tag: DW_TAG_const_type
149dd4e4e6SDuncan P. N. Exon Smith // CHECK: !DISubprogram(name: "r"
15f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME: line: [[@LINE+4]]
16f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME: type: ![[PRSR:[0-9]+]]
17f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME: flags: DIFlagPublic | DIFlagPrototyped | DIFlagRValueReference,
189dd4e4e6SDuncan P. N. Exon Smith // CHECK: ![[PRSR]] = !DISubroutineType(flags: DIFlagRValueReference, types: ![[ARGS]])
190630eb70SAdrian Prantl void r() const &&;
200630eb70SAdrian Prantl };
210630eb70SAdrian Prantl
g()220630eb70SAdrian Prantl void g() {
230630eb70SAdrian Prantl A a;
240630eb70SAdrian Prantl // The type of pl is "void (A::*)() const &".
2538a7f11aSDuncan P. N. Exon Smith // CHECK: !DILocalVariable(name: "pl",
26f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME: line: [[@LINE+3]]
27f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME: type: ![[PL:[0-9]+]]
289dd4e4e6SDuncan P. N. Exon Smith // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PLSR]]
290630eb70SAdrian Prantl auto pl = &A::l;
300630eb70SAdrian Prantl
3138a7f11aSDuncan P. N. Exon Smith // CHECK: !DILocalVariable(name: "pr",
32f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME: line: [[@LINE+3]]
33f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME: type: ![[PR:[0-9]+]]
349dd4e4e6SDuncan P. N. Exon Smith // CHECK: !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: ![[PRSR]]
350630eb70SAdrian Prantl auto pr = &A::r;
360630eb70SAdrian Prantl }
37