Lines Matching refs:p

27 void bad_boolean(const OSBoolean *p) {  in bad_boolean()  argument
29 …if (p) {} // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to a primiti… in bad_boolean()
30 …if (!p) {} // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to a primit… in bad_boolean()
31 …p ? 1 : 2; // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to a primit… in bad_boolean()
33 if (p) {} // no-warning in bad_boolean()
34 if (!p) {} // no-warning in bad_boolean()
35 p ? 1 : 2; // no-warning in bad_boolean()
37 …(bool)p; // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to a primitiv… in bad_boolean()
38 …bool x = p; // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to a primi… in bad_boolean()
39 …x = p; // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to a primitive … in bad_boolean()
40 …takes_bool(p); // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to a pr… in bad_boolean()
44 void bad_number(const OSNumber *p) { in bad_number() argument
46 …if (p) {} // expected-warning{{Converting a pointer value of type 'class OSNumber *' to a scalar b… in bad_number()
47 …if (!p) {} // expected-warning{{Converting a pointer value of type 'class OSNumber *' to a scalar … in bad_number()
48 …p ? 1 : 2; // expected-warning{{Converting a pointer value of type 'class OSNumber *' to a scalar … in bad_number()
49 …if (p == 0) {} // expected-warning{{Comparing a pointer value of type 'class OSNumber *' to a scal… in bad_number()
51 if (p) {} // no-warning in bad_number()
52 if (!p) {} // no-warning in bad_number()
53 p ? 1 : 2; // no-warning in bad_number()
54 if (p == 0) {} // no-warning in bad_number()
56 …(int)p; // expected-warning{{Converting a pointer value of type 'class OSNumber *' to a scalar int… in bad_number()
57 …takes_bool(p); // expected-warning{{Converting a pointer value of type 'class OSNumber *' to a sca… in bad_number()
62 void bad_sugared(sugared_OSBoolean p) { in bad_sugared() argument
63 …sugared_bool x = p; // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to… in bad_sugared()
66 void good(const OSBoolean *p) { in good() argument
67 bool x = p->isTrue(); // no-warning in good()
68 (bool)p->isFalse(); // no-warning in good()
69 if (p == kOSBooleanTrue) {} // no-warning in good()
72 void suppression(const OSBoolean *p) { in suppression() argument
73 if (p == NULL) {} // no-warning in suppression()
74 bool y = (p == nullptr); // no-warning in suppression()
81 void test_intptr_t(const OSBoolean *p) { in test_intptr_t() argument
82 …(long)p; // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to a primitiv… in test_intptr_t()
83 (intptr_t)p; // no-warning in test_intptr_t()
84 …(unsigned long)p; // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to a… in test_intptr_t()
85 (uintptr_t)p; // no-warning in test_intptr_t()
86 …(fintptr_t)p; // expected-warning{{Converting a pointer value of type 'class OSBoolean *' to a pri… in test_intptr_t()
92 void test_non_pointer_NULL(const OSBoolean *p) { in test_non_pointer_NULL() argument
93 if (p == NULL) {} // no-warning in test_non_pointer_NULL()