2013-12-19 05:48:18 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++11 -emit-llvm -g -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:
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: !"0x2e\00l\00{{.*}}\00[[@LINE+2]]"{{, [^,]+, [^,]+}}, ![[PLSR:[0-9]+]], {{.*}}[ DW_TAG_subprogram ] [line [[@LINE+2]]] [public] [reference] [l]
|
2013-12-19 09:38:47 +08:00
|
|
|
// CHECK: ![[PLSR]] ={{.*}}[ DW_TAG_subroutine_type ]{{.*}}[reference]
|
2013-12-19 05:48:18 +08:00
|
|
|
void l() const &;
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: ![[ARGS:[0-9]+]] = !{null, ![[THIS:[0-9]+]]}
|
|
|
|
// CHECK: ![[THIS]] = {{.*}} ![[CONST_A:.*]]} ; [ DW_TAG_pointer_type ]
|
2013-12-19 09:38:47 +08:00
|
|
|
// CHECK: ![[CONST_A]] = {{.*}} [ DW_TAG_const_type ]
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: !"0x2e\00r\00{{.*}}\00[[@LINE+2]]"{{, [^,]+, [^,]+}}, ![[PRSR:[0-9]+]], {{.*}}[ DW_TAG_subprogram ] [line [[@LINE+2]]] [public] [rvalue reference] [r]
|
|
|
|
// CHECK: ![[PRSR]] ={{.*}}![[ARGS]], null, null, null}{{.*}}[ DW_TAG_subroutine_type ]{{.*}}[rvalue reference]
|
2013-12-19 05:48:18 +08:00
|
|
|
void r() const &&;
|
|
|
|
};
|
|
|
|
|
|
|
|
void g() {
|
|
|
|
A a;
|
|
|
|
// The type of pl is "void (A::*)() const &".
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: ![[PL:[0-9]+]]} ; [ DW_TAG_auto_variable ] [pl] [line [[@LINE+2]]]
|
|
|
|
// CHECK: ![[PLSR]], !"{{.*}}"} ; [ DW_TAG_ptr_to_member_type ]
|
2013-12-19 05:48:18 +08:00
|
|
|
auto pl = &A::l;
|
|
|
|
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: ![[PR:[0-9]+]]} ; [ DW_TAG_auto_variable ] [pr] [line [[@LINE+2]]]
|
|
|
|
// CHECK: ![[PRSR]], !"{{.*}}"} ; [ DW_TAG_ptr_to_member_type ]
|
2013-12-19 05:48:18 +08:00
|
|
|
auto pr = &A::r;
|
|
|
|
}
|