Lines Matching full:warning
43 Dummy &r = *p; // expected-warning {{Nullable pointer is dereferenced}}
46 int b = p->val; // expected-warning {{Nullable pointer is dereferenced}}
49 int stuff = *ptr; // expected-warning {{Nullable pointer is dereferenced}}
52 takesNonnull(p); // expected-warning {{Nullable pointer is passed to a callee that requires a non-null 1st parameter}}
60 case 5: takesAttrNonnull(p); break; // expected-warning {{Nullable pointer is passed to}}
61 default: { Dummy d = *p; } break; // expected-warning {{Nullable pointer is dereferenced}}
74 takesNonnull(q); // expected-warning {{Null passed to a callee that requires a non-null 1st parameter}}
78 nonnull = q; // expected-warning {{Null is assigned to a pointer which is expected to have non-null value}}
91 case 1: nonnull = p; break; // expected-warning {{Nullable pointer is assigned to a pointer which is expected to have non-null value}}
96 case 6: testMultiParamChecking(nonnull, nullable, nullable); break; // expected-warning {{Nullable pointer is passed to a callee that requires a non-null 3rd parameter}}
97 case 7: testMultiParamChecking(nullable, nullable, nonnull); // expected-warning {{Nullable pointer is passed to a callee that requires a non-null 1st parameter}}
98 case 8: testMultiParamChecking(nullable, nullable, nullable); // expected-warning {{Nullable pointer is passed to a callee that requires a non-null 1st parameter}}
105 return p; // expected-warning {{Nullable pointer is returned from a function that is expected to return a non-null value}}
110 return p; // expected-warning {{Null is returned from a function that is expected to return a non-null value}}
123 [o takesNonnull:shouldBeNullable]; // No warning expected.
128 [o takesNonnull:shouldBeNullable]; // No warning expected.
132 [o takesNonnull:shouldBeNullable]; // expected-warning {{Nullable pointer is passed to a callee that requires a non-null 1st parameter}}
136 [o takesNonnull:shouldBeNullable]; // expected-warning {{Nullable pointer is passed to a callee that requires a non-null 1st parameter}}
141 [o takesNonnull:shouldBeNullable]; // expected-warning {{Nullable pointer is passed to a callee that requires a non-null 1st parameter}}
145 [o takesNonnull:shouldBeNullable]; // expected-warning {{Nullable pointer is passed to a callee that requires a non-null 1st parameter}}
156 takesNonnull((Dummy * _Nonnull)p); // no-warning
157 return (Dummy * _Nonnull)p; // no-warning
162 takesNonnull(p); // no-warning
163 return p; // no-warning
167 takesNonnull((Dummy * _Nonnull)0); // no-warning
168 return (Dummy * _Nonnull)0; // no-warning
173 // FIXME: Ideally the cast above would suppress this warning.
174 takesNonnull(p); // expected-warning {{Null passed to a callee that requires a non-null 1st parameter}}
178 Dummy * _Nonnull nonnullLocalWithAssignmentInInitializer = (Dummy * _Nonnull)0; // no-warning
190 nonnullLocalWithAssignment = (Dummy * _Nonnull)0; // no-warning
200 p = (Dummy * _Nonnull)0; // no-warning
210 _nonnullIvar = (Dummy * _Nonnull)0; // no-warning;
220 takesNonnull(p); // expected-warning {{Null passed to a callee that requires a non-null 1st parameter}}
225 takesNonnull(p); // expected-warning {{Null passed to a callee that requires a non-null 1st parameter}}
231 // FIXME: Ideally the cast above would suppress this warning.
232 return p; // expected-warning {{Null is returned from a function that is expected to return a non-null value}}
243 takesNonnull(p); // expected-warning {{Nullable pointer is passed to a callee that requires a non-null 1st parameter}}
244 takesNonnull(p); // No warning.
245 // The first warning was not a sink. The analysis expected to continue.
247 i = 5 / i; // expected-warning {{Division by zero}}
255 0; // avoid compiler warning (which is not generated by the analyzer)
257 return ret; // no warning
259 return p; // no warning
268 0; // avoid compiler warning (which is not generated by the analyzer)
270 return ret; // no warning
272 return p; // no warning
289 return x; // no-warning
303 return x; // no-warning
310 return result; // no-warning; but this is an over suppression
342 takesNonnull(p); // no-warning
345 Dummy *_Nonnull varWithInitializer = p; // no-warning
347 Dummy *_Nonnull var1WithInitializer = p, // no-warning
348 *_Nonnull var2WithInitializer = p; // no-warning
353 varWithoutInitializer = p; // no-warning
376 return local; // expected-warning {{Nullable pointer is returned from a method that is expected to return a non-null value}}
381 return (TestObject * _Nonnull)local; // no-warning
387 return local; // no-warning
389 return p; // no-warning
403 return self; // no-warning
428 return self; // no-warning
435 return nil; // no-warning
475 // expected-warning@-2{{Nullable pointer is passed to a callee that requires a non-null 1st parameter}}
485 // expected-warning@-2{{Nullable pointer is passed to a callee that requires a non-null 1st parameter}}
513 return nil; // no-warning
519 return _internal == 0 ? nil : _internal->_someIvar; // no-warning
525 return nil; // no-warning