1// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s 2struct X { 3 int f() &; 4 int g() &&; 5 int h() const &&; 6}; 7 8// CHECK-LABEL: define i32 @_ZNR1X1fEv 9int X::f() & { return 0; } 10// CHECK-LABEL: define i32 @_ZNO1X1gEv 11int X::g() && { return 0; } 12// CHECK-LABEL: define i32 @_ZNKO1X1hEv 13int X::h() const && { return 0; } 14 15// CHECK-LABEL: define void @_Z1fM1XFivREMS_FivOEMS_KFivOE 16void f(int (X::*)() &, int (X::*)() &&, int (X::*)() const&&) { } 17 18// CHECK-LABEL: define void @_Z1g1AIFivEES_IFivREES_IFivOEES_IKFivEES_IKFivREES_IKFivOEES_IVKFivEES_IVKFivREES_IVKFivOEE() 19template <class T> struct A {}; 20void g(A<int()>, A<int()&>, A<int()&&>, 21 A<int() const>, A<int() const &>, A<int() const &&>, 22 A<int() const volatile>, A<int() const volatile &>, A<int() const volatile &&>) {} 23