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