Lines Matching full:nullptr
4 typedef decltype(nullptr) nullptr_t;
16 null = nullptr;
17 void *p = nullptr;
19 int *pi = nullptr;
22 int A::*pm = nullptr;
24 void (*pf)() = nullptr;
26 void (A::*pmf)() = nullptr;
28 bool b = nullptr;
30 // Can't convert nullptr to integral implicitly.
31 uintptr_t i = nullptr; // expected-error {{cannot initialize}}
34 (void)(null == nullptr);
35 (void)(null <= nullptr);
37 (void)((void*)0 == nullptr);
39 (void)((void*)0 <= nullptr);
40 (void)(0 == nullptr);
41 (void)(nullptr == 0);
42 (void)(nullptr <= 0);
43 (void)(0 <= nullptr);
44 (void)(1 > nullptr); // expected-error {{invalid operands to binary expression}}
45 (void)(1 != nullptr); // expected-error {{invalid operands to binary expression}}
46 (void)(1 + nullptr); // expected-error {{invalid operands to binary expression}}
47 (void)(0 ? nullptr : 0); // expected-error {{non-pointer operand type 'int' incompatible with nullptr}}
48 (void)(0 ? nullptr : (void*)0);
49 (void)(0 ? nullptr : A()); // expected-error {{non-pointer operand type 'A' incompatible with nullptr}}
50 (void)(0 ? A() : nullptr); // expected-error {{non-pointer operand type 'A' incompatible with nullptr}}
53 int t = o1(nullptr);
55 o2(nullptr); // expected-error {{ambiguous}}
57 // nullptr is an rvalue, null is an lvalue
58 (void)&nullptr; // expected-error {{address expression must be an lvalue}}
61 // You can reinterpret_cast nullptr to an integer.
62 (void)reinterpret_cast<uintptr_t>(nullptr);
68 // You can throw nullptr.
69 throw nullptr;
72 // Template arguments can be nullptr.
76 typedef T<nullptr, nullptr, nullptr, nullptr> NT;
91 static_assert(is_same<decltype(g(nullptr)), void*>::value, "");
98 // nullptr can be used as the sentinel value.
99 f(10, nullptr);
107 // Don't warn when using nullptr with %p.
108 f("%p", nullptr);
118 int relational0[nullptr < nullptr? -1 : 1];
119 int relational1[nullptr > nullptr? -1 : 1];
120 int relational2[nullptr <= nullptr? 1 : -1];
121 int relational3[nullptr >= nullptr? 1 : -1];
122 int equality[nullptr == nullptr? 1 : -1];
123 int inequality[nullptr != nullptr? -1 : 1];
131 int &ir = (f1)(nullptr);
156 X<int, nullptr> x;
162 X2<nullptr, nullptr, nullptr, nullptr> x2;