1 // RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -I%S -emit-llvm -o - %s | FileCheck %s
5 // CHECK: @_ZTIDn = external constant ptr
12 typedef decltype(nullptr) nullptr_t
;
14 nullptr_t
get_nullptr();
18 // CHECK: call ptr @_Z11get_nullptrv()
19 int (X::*pmf
)(int) = get_nullptr();
22 const std::type_info
& f2() {
23 return typeid(nullptr_t
);
30 // CHECK-LABEL: define {{.*}}pr23833_a
34 // CHECK: ret i1 false
35 bool pr23833_a(U
&u
) { return bool(u
.b
); }
37 // CHECK-LABEL: define {{.*}}pr23833_b
41 // CHECK: ret ptr null
42 nullptr_t
pr23833_b(nullptr_t
&n
) { return n
; }
44 struct X1
{ operator int*(); };
45 struct X2
{ operator const nullptr_t
&(); };
47 // CHECK-LABEL: define {{.*}}pr23833_c
48 // CHECK: call {{.*}}X1
49 // CHECK: call {{.*}}X2
56 // CHECK-LABEL: define {{.*}}pr23833_d
57 // CHECK: call {{.*}}X2
68 constexpr nullptr_t null
= nullptr;