path-notes.c revision b0e1badc2a9b8275b48dfb15c6907a282b949b02
1// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-ipa=inlining -analyzer-output=text -verify %s 2 3void zero(int **p) { 4 *p = 0; 5 // expected-note@-1 {{Null pointer value stored to 'a'}} 6} 7 8void testZero(int *a) { 9 zero(&a); 10 // expected-note@-1 {{Calling 'zero'}} 11 // expected-note@-2 {{Returning from 'zero'}} 12 *a = 1; // expected-warning{{Dereference of null pointer}} 13 // expected-note@-1 {{Dereference of null pointer (loaded from variable 'a')}} 14}