1 // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s
2 // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist
3 // RUN: FileCheck --input-file=%t.plist %s
4 
5 struct S {
6   int *x;
7   int y;
8 };
9 
10 int *foo();
11 
test(struct S syz,int * pp)12 void test(struct S syz, int *pp) {
13   int m = 0;
14   syz.x = foo(); // expected-note{{Value assigned to 'syz.x'}}
15 
16   struct S *ps = &syz;
17   if (ps->x)
18     //expected-note@-1{{Taking false branch}}
19     //expected-note@-2{{Assuming pointer value is null}}
20 
21     m++;
22 
23   m += *syz.x; // expected-warning{{Dereference of null pointer (loaded from field 'x')}}
24   // expected-note@-1{{Dereference of null pointer (loaded from field 'x')}}
25 }
26 
testTrackConstraintBRVisitorIsTrackingTurnedOn(struct S syz,int * pp)27 void testTrackConstraintBRVisitorIsTrackingTurnedOn(struct S syz, int *pp) {
28   int m = 0;
29   syz.x = foo(); // expected-note{{Value assigned to 'syz.x'}}
30 
31   struct S *ps = &syz;
32   if (ps->x)
33     //expected-note@-1{{Taking false branch}}
34     //expected-note@-2{{Assuming pointer value is null}}
35 
36     m++;
37   int *p = syz.x; //expected-note {{'p' initialized to a null pointer value}}
38   m = *p; // expected-warning {{Dereference of null pointer (loaded from variable 'p')}}
39           // expected-note@-1 {{Dereference of null pointer (loaded from variable 'p')}}
40 }
41 
42 // CHECK:  <key>diagnostics</key>
43 // CHECK-NEXT:  <array>
44 // CHECK-NEXT:   <dict>
45 // CHECK-NEXT:    <key>path</key>
46 // CHECK-NEXT:    <array>
47 // CHECK-NEXT:     <dict>
48 // CHECK-NEXT:      <key>kind</key><string>control</string>
49 // CHECK-NEXT:      <key>edges</key>
50 // CHECK-NEXT:       <array>
51 // CHECK-NEXT:        <dict>
52 // CHECK-NEXT:         <key>start</key>
53 // CHECK-NEXT:          <array>
54 // CHECK-NEXT:           <dict>
55 // CHECK-NEXT:            <key>line</key><integer>13</integer>
56 // CHECK-NEXT:            <key>col</key><integer>3</integer>
57 // CHECK-NEXT:            <key>file</key><integer>0</integer>
58 // CHECK-NEXT:           </dict>
59 // CHECK-NEXT:           <dict>
60 // CHECK-NEXT:            <key>line</key><integer>13</integer>
61 // CHECK-NEXT:            <key>col</key><integer>5</integer>
62 // CHECK-NEXT:            <key>file</key><integer>0</integer>
63 // CHECK-NEXT:           </dict>
64 // CHECK-NEXT:          </array>
65 // CHECK-NEXT:         <key>end</key>
66 // CHECK-NEXT:          <array>
67 // CHECK-NEXT:           <dict>
68 // CHECK-NEXT:            <key>line</key><integer>14</integer>
69 // CHECK-NEXT:            <key>col</key><integer>3</integer>
70 // CHECK-NEXT:            <key>file</key><integer>0</integer>
71 // CHECK-NEXT:           </dict>
72 // CHECK-NEXT:           <dict>
73 // CHECK-NEXT:            <key>line</key><integer>14</integer>
74 // CHECK-NEXT:            <key>col</key><integer>5</integer>
75 // CHECK-NEXT:            <key>file</key><integer>0</integer>
76 // CHECK-NEXT:           </dict>
77 // CHECK-NEXT:          </array>
78 // CHECK-NEXT:        </dict>
79 // CHECK-NEXT:       </array>
80 // CHECK-NEXT:     </dict>
81 // CHECK-NEXT:     <dict>
82 // CHECK-NEXT:      <key>kind</key><string>event</string>
83 // CHECK-NEXT:      <key>location</key>
84 // CHECK-NEXT:      <dict>
85 // CHECK-NEXT:       <key>line</key><integer>14</integer>
86 // CHECK-NEXT:       <key>col</key><integer>3</integer>
87 // CHECK-NEXT:       <key>file</key><integer>0</integer>
88 // CHECK-NEXT:      </dict>
89 // CHECK-NEXT:      <key>ranges</key>
90 // CHECK-NEXT:      <array>
91 // CHECK-NEXT:        <array>
92 // CHECK-NEXT:         <dict>
93 // CHECK-NEXT:          <key>line</key><integer>14</integer>
94 // CHECK-NEXT:          <key>col</key><integer>3</integer>
95 // CHECK-NEXT:          <key>file</key><integer>0</integer>
96 // CHECK-NEXT:         </dict>
97 // CHECK-NEXT:         <dict>
98 // CHECK-NEXT:          <key>line</key><integer>14</integer>
99 // CHECK-NEXT:          <key>col</key><integer>15</integer>
100 // CHECK-NEXT:          <key>file</key><integer>0</integer>
101 // CHECK-NEXT:         </dict>
102 // CHECK-NEXT:        </array>
103 // CHECK-NEXT:      </array>
104 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
105 // CHECK-NEXT:      <key>extended_message</key>
106 // CHECK-NEXT:      <string>Value assigned to &apos;syz.x&apos;</string>
107 // CHECK-NEXT:      <key>message</key>
108 // CHECK-NEXT:      <string>Value assigned to &apos;syz.x&apos;</string>
109 // CHECK-NEXT:     </dict>
110 // CHECK-NEXT:     <dict>
111 // CHECK-NEXT:      <key>kind</key><string>control</string>
112 // CHECK-NEXT:      <key>edges</key>
113 // CHECK-NEXT:       <array>
114 // CHECK-NEXT:        <dict>
115 // CHECK-NEXT:         <key>start</key>
116 // CHECK-NEXT:          <array>
117 // CHECK-NEXT:           <dict>
118 // CHECK-NEXT:            <key>line</key><integer>14</integer>
119 // CHECK-NEXT:            <key>col</key><integer>3</integer>
120 // CHECK-NEXT:            <key>file</key><integer>0</integer>
121 // CHECK-NEXT:           </dict>
122 // CHECK-NEXT:           <dict>
123 // CHECK-NEXT:            <key>line</key><integer>14</integer>
124 // CHECK-NEXT:            <key>col</key><integer>5</integer>
125 // CHECK-NEXT:            <key>file</key><integer>0</integer>
126 // CHECK-NEXT:           </dict>
127 // CHECK-NEXT:          </array>
128 // CHECK-NEXT:         <key>end</key>
129 // CHECK-NEXT:          <array>
130 // CHECK-NEXT:           <dict>
131 // CHECK-NEXT:            <key>line</key><integer>17</integer>
132 // CHECK-NEXT:            <key>col</key><integer>3</integer>
133 // CHECK-NEXT:            <key>file</key><integer>0</integer>
134 // CHECK-NEXT:           </dict>
135 // CHECK-NEXT:           <dict>
136 // CHECK-NEXT:            <key>line</key><integer>17</integer>
137 // CHECK-NEXT:            <key>col</key><integer>4</integer>
138 // CHECK-NEXT:            <key>file</key><integer>0</integer>
139 // CHECK-NEXT:           </dict>
140 // CHECK-NEXT:          </array>
141 // CHECK-NEXT:        </dict>
142 // CHECK-NEXT:       </array>
143 // CHECK-NEXT:     </dict>
144 // CHECK-NEXT:     <dict>
145 // CHECK-NEXT:      <key>kind</key><string>control</string>
146 // CHECK-NEXT:      <key>edges</key>
147 // CHECK-NEXT:       <array>
148 // CHECK-NEXT:        <dict>
149 // CHECK-NEXT:         <key>start</key>
150 // CHECK-NEXT:          <array>
151 // CHECK-NEXT:           <dict>
152 // CHECK-NEXT:            <key>line</key><integer>17</integer>
153 // CHECK-NEXT:            <key>col</key><integer>3</integer>
154 // CHECK-NEXT:            <key>file</key><integer>0</integer>
155 // CHECK-NEXT:           </dict>
156 // CHECK-NEXT:           <dict>
157 // CHECK-NEXT:            <key>line</key><integer>17</integer>
158 // CHECK-NEXT:            <key>col</key><integer>4</integer>
159 // CHECK-NEXT:            <key>file</key><integer>0</integer>
160 // CHECK-NEXT:           </dict>
161 // CHECK-NEXT:          </array>
162 // CHECK-NEXT:         <key>end</key>
163 // CHECK-NEXT:          <array>
164 // CHECK-NEXT:           <dict>
165 // CHECK-NEXT:            <key>line</key><integer>17</integer>
166 // CHECK-NEXT:            <key>col</key><integer>7</integer>
167 // CHECK-NEXT:            <key>file</key><integer>0</integer>
168 // CHECK-NEXT:           </dict>
169 // CHECK-NEXT:           <dict>
170 // CHECK-NEXT:            <key>line</key><integer>17</integer>
171 // CHECK-NEXT:            <key>col</key><integer>8</integer>
172 // CHECK-NEXT:            <key>file</key><integer>0</integer>
173 // CHECK-NEXT:           </dict>
174 // CHECK-NEXT:          </array>
175 // CHECK-NEXT:        </dict>
176 // CHECK-NEXT:       </array>
177 // CHECK-NEXT:     </dict>
178 // CHECK-NEXT:     <dict>
179 // CHECK-NEXT:      <key>kind</key><string>event</string>
180 // CHECK-NEXT:      <key>location</key>
181 // CHECK-NEXT:      <dict>
182 // CHECK-NEXT:       <key>line</key><integer>17</integer>
183 // CHECK-NEXT:       <key>col</key><integer>7</integer>
184 // CHECK-NEXT:       <key>file</key><integer>0</integer>
185 // CHECK-NEXT:      </dict>
186 // CHECK-NEXT:      <key>ranges</key>
187 // CHECK-NEXT:      <array>
188 // CHECK-NEXT:        <array>
189 // CHECK-NEXT:         <dict>
190 // CHECK-NEXT:          <key>line</key><integer>17</integer>
191 // CHECK-NEXT:          <key>col</key><integer>7</integer>
192 // CHECK-NEXT:          <key>file</key><integer>0</integer>
193 // CHECK-NEXT:         </dict>
194 // CHECK-NEXT:         <dict>
195 // CHECK-NEXT:          <key>line</key><integer>17</integer>
196 // CHECK-NEXT:          <key>col</key><integer>11</integer>
197 // CHECK-NEXT:          <key>file</key><integer>0</integer>
198 // CHECK-NEXT:         </dict>
199 // CHECK-NEXT:        </array>
200 // CHECK-NEXT:      </array>
201 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
202 // CHECK-NEXT:      <key>extended_message</key>
203 // CHECK-NEXT:      <string>Assuming pointer value is null</string>
204 // CHECK-NEXT:      <key>message</key>
205 // CHECK-NEXT:      <string>Assuming pointer value is null</string>
206 // CHECK-NEXT:     </dict>
207 // CHECK-NEXT:     <dict>
208 // CHECK-NEXT:      <key>kind</key><string>control</string>
209 // CHECK-NEXT:      <key>edges</key>
210 // CHECK-NEXT:       <array>
211 // CHECK-NEXT:        <dict>
212 // CHECK-NEXT:         <key>start</key>
213 // CHECK-NEXT:          <array>
214 // CHECK-NEXT:           <dict>
215 // CHECK-NEXT:            <key>line</key><integer>17</integer>
216 // CHECK-NEXT:            <key>col</key><integer>7</integer>
217 // CHECK-NEXT:            <key>file</key><integer>0</integer>
218 // CHECK-NEXT:           </dict>
219 // CHECK-NEXT:           <dict>
220 // CHECK-NEXT:            <key>line</key><integer>17</integer>
221 // CHECK-NEXT:            <key>col</key><integer>8</integer>
222 // CHECK-NEXT:            <key>file</key><integer>0</integer>
223 // CHECK-NEXT:           </dict>
224 // CHECK-NEXT:          </array>
225 // CHECK-NEXT:         <key>end</key>
226 // CHECK-NEXT:          <array>
227 // CHECK-NEXT:           <dict>
228 // CHECK-NEXT:            <key>line</key><integer>23</integer>
229 // CHECK-NEXT:            <key>col</key><integer>3</integer>
230 // CHECK-NEXT:            <key>file</key><integer>0</integer>
231 // CHECK-NEXT:           </dict>
232 // CHECK-NEXT:           <dict>
233 // CHECK-NEXT:            <key>line</key><integer>23</integer>
234 // CHECK-NEXT:            <key>col</key><integer>3</integer>
235 // CHECK-NEXT:            <key>file</key><integer>0</integer>
236 // CHECK-NEXT:           </dict>
237 // CHECK-NEXT:          </array>
238 // CHECK-NEXT:        </dict>
239 // CHECK-NEXT:       </array>
240 // CHECK-NEXT:     </dict>
241 // CHECK-NEXT:     <dict>
242 // CHECK-NEXT:      <key>kind</key><string>control</string>
243 // CHECK-NEXT:      <key>edges</key>
244 // CHECK-NEXT:       <array>
245 // CHECK-NEXT:        <dict>
246 // CHECK-NEXT:         <key>start</key>
247 // CHECK-NEXT:          <array>
248 // CHECK-NEXT:           <dict>
249 // CHECK-NEXT:            <key>line</key><integer>23</integer>
250 // CHECK-NEXT:            <key>col</key><integer>3</integer>
251 // CHECK-NEXT:            <key>file</key><integer>0</integer>
252 // CHECK-NEXT:           </dict>
253 // CHECK-NEXT:           <dict>
254 // CHECK-NEXT:            <key>line</key><integer>23</integer>
255 // CHECK-NEXT:            <key>col</key><integer>3</integer>
256 // CHECK-NEXT:            <key>file</key><integer>0</integer>
257 // CHECK-NEXT:           </dict>
258 // CHECK-NEXT:          </array>
259 // CHECK-NEXT:         <key>end</key>
260 // CHECK-NEXT:          <array>
261 // CHECK-NEXT:           <dict>
262 // CHECK-NEXT:            <key>line</key><integer>23</integer>
263 // CHECK-NEXT:            <key>col</key><integer>8</integer>
264 // CHECK-NEXT:            <key>file</key><integer>0</integer>
265 // CHECK-NEXT:           </dict>
266 // CHECK-NEXT:           <dict>
267 // CHECK-NEXT:            <key>line</key><integer>23</integer>
268 // CHECK-NEXT:            <key>col</key><integer>8</integer>
269 // CHECK-NEXT:            <key>file</key><integer>0</integer>
270 // CHECK-NEXT:           </dict>
271 // CHECK-NEXT:          </array>
272 // CHECK-NEXT:        </dict>
273 // CHECK-NEXT:       </array>
274 // CHECK-NEXT:     </dict>
275 // CHECK-NEXT:     <dict>
276 // CHECK-NEXT:      <key>kind</key><string>event</string>
277 // CHECK-NEXT:      <key>location</key>
278 // CHECK-NEXT:      <dict>
279 // CHECK-NEXT:       <key>line</key><integer>23</integer>
280 // CHECK-NEXT:       <key>col</key><integer>8</integer>
281 // CHECK-NEXT:       <key>file</key><integer>0</integer>
282 // CHECK-NEXT:      </dict>
283 // CHECK-NEXT:      <key>ranges</key>
284 // CHECK-NEXT:      <array>
285 // CHECK-NEXT:        <array>
286 // CHECK-NEXT:         <dict>
287 // CHECK-NEXT:          <key>line</key><integer>23</integer>
288 // CHECK-NEXT:          <key>col</key><integer>13</integer>
289 // CHECK-NEXT:          <key>file</key><integer>0</integer>
290 // CHECK-NEXT:         </dict>
291 // CHECK-NEXT:         <dict>
292 // CHECK-NEXT:          <key>line</key><integer>23</integer>
293 // CHECK-NEXT:          <key>col</key><integer>13</integer>
294 // CHECK-NEXT:          <key>file</key><integer>0</integer>
295 // CHECK-NEXT:         </dict>
296 // CHECK-NEXT:        </array>
297 // CHECK-NEXT:      </array>
298 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
299 // CHECK-NEXT:      <key>extended_message</key>
300 // CHECK-NEXT:      <string>Dereference of null pointer (loaded from field &apos;x&apos;)</string>
301 // CHECK-NEXT:      <key>message</key>
302 // CHECK-NEXT:      <string>Dereference of null pointer (loaded from field &apos;x&apos;)</string>
303 // CHECK-NEXT:     </dict>
304 // CHECK-NEXT:    </array>
305 // CHECK-NEXT:    <key>description</key><string>Dereference of null pointer (loaded from field &apos;x&apos;)</string>
306 // CHECK-NEXT:    <key>category</key><string>Logic error</string>
307 // CHECK-NEXT:    <key>type</key><string>Dereference of null pointer</string>
308 // CHECK-NEXT:    <key>check_name</key><string>core.NullDereference</string>
309 // CHECK-NEXT:   <key>issue_context_kind</key><string>function</string>
310 // CHECK-NEXT:   <key>issue_context</key><string>test</string>
311 // CHECK-NEXT:   <key>issue_hash</key><string>11</string>
312 // CHECK-NEXT:   <key>location</key>
313 // CHECK-NEXT:   <dict>
314 // CHECK-NEXT:    <key>line</key><integer>23</integer>
315 // CHECK-NEXT:    <key>col</key><integer>8</integer>
316 // CHECK-NEXT:    <key>file</key><integer>0</integer>
317 // CHECK-NEXT:   </dict>
318 // CHECK-NEXT:   </dict>
319 // CHECK-NEXT:   <dict>
320 // CHECK-NEXT:    <key>path</key>
321 // CHECK-NEXT:    <array>
322 // CHECK-NEXT:     <dict>
323 // CHECK-NEXT:      <key>kind</key><string>control</string>
324 // CHECK-NEXT:      <key>edges</key>
325 // CHECK-NEXT:       <array>
326 // CHECK-NEXT:        <dict>
327 // CHECK-NEXT:         <key>start</key>
328 // CHECK-NEXT:          <array>
329 // CHECK-NEXT:           <dict>
330 // CHECK-NEXT:            <key>line</key><integer>28</integer>
331 // CHECK-NEXT:            <key>col</key><integer>3</integer>
332 // CHECK-NEXT:            <key>file</key><integer>0</integer>
333 // CHECK-NEXT:           </dict>
334 // CHECK-NEXT:           <dict>
335 // CHECK-NEXT:            <key>line</key><integer>28</integer>
336 // CHECK-NEXT:            <key>col</key><integer>5</integer>
337 // CHECK-NEXT:            <key>file</key><integer>0</integer>
338 // CHECK-NEXT:           </dict>
339 // CHECK-NEXT:          </array>
340 // CHECK-NEXT:         <key>end</key>
341 // CHECK-NEXT:          <array>
342 // CHECK-NEXT:           <dict>
343 // CHECK-NEXT:            <key>line</key><integer>29</integer>
344 // CHECK-NEXT:            <key>col</key><integer>3</integer>
345 // CHECK-NEXT:            <key>file</key><integer>0</integer>
346 // CHECK-NEXT:           </dict>
347 // CHECK-NEXT:           <dict>
348 // CHECK-NEXT:            <key>line</key><integer>29</integer>
349 // CHECK-NEXT:            <key>col</key><integer>5</integer>
350 // CHECK-NEXT:            <key>file</key><integer>0</integer>
351 // CHECK-NEXT:           </dict>
352 // CHECK-NEXT:          </array>
353 // CHECK-NEXT:        </dict>
354 // CHECK-NEXT:       </array>
355 // CHECK-NEXT:     </dict>
356 // CHECK-NEXT:     <dict>
357 // CHECK-NEXT:      <key>kind</key><string>event</string>
358 // CHECK-NEXT:      <key>location</key>
359 // CHECK-NEXT:      <dict>
360 // CHECK-NEXT:       <key>line</key><integer>29</integer>
361 // CHECK-NEXT:       <key>col</key><integer>3</integer>
362 // CHECK-NEXT:       <key>file</key><integer>0</integer>
363 // CHECK-NEXT:      </dict>
364 // CHECK-NEXT:      <key>ranges</key>
365 // CHECK-NEXT:      <array>
366 // CHECK-NEXT:        <array>
367 // CHECK-NEXT:         <dict>
368 // CHECK-NEXT:          <key>line</key><integer>29</integer>
369 // CHECK-NEXT:          <key>col</key><integer>3</integer>
370 // CHECK-NEXT:          <key>file</key><integer>0</integer>
371 // CHECK-NEXT:         </dict>
372 // CHECK-NEXT:         <dict>
373 // CHECK-NEXT:          <key>line</key><integer>29</integer>
374 // CHECK-NEXT:          <key>col</key><integer>15</integer>
375 // CHECK-NEXT:          <key>file</key><integer>0</integer>
376 // CHECK-NEXT:         </dict>
377 // CHECK-NEXT:        </array>
378 // CHECK-NEXT:      </array>
379 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
380 // CHECK-NEXT:      <key>extended_message</key>
381 // CHECK-NEXT:      <string>Value assigned to &apos;syz.x&apos;</string>
382 // CHECK-NEXT:      <key>message</key>
383 // CHECK-NEXT:      <string>Value assigned to &apos;syz.x&apos;</string>
384 // CHECK-NEXT:     </dict>
385 // CHECK-NEXT:     <dict>
386 // CHECK-NEXT:      <key>kind</key><string>control</string>
387 // CHECK-NEXT:      <key>edges</key>
388 // CHECK-NEXT:       <array>
389 // CHECK-NEXT:        <dict>
390 // CHECK-NEXT:         <key>start</key>
391 // CHECK-NEXT:          <array>
392 // CHECK-NEXT:           <dict>
393 // CHECK-NEXT:            <key>line</key><integer>29</integer>
394 // CHECK-NEXT:            <key>col</key><integer>3</integer>
395 // CHECK-NEXT:            <key>file</key><integer>0</integer>
396 // CHECK-NEXT:           </dict>
397 // CHECK-NEXT:           <dict>
398 // CHECK-NEXT:            <key>line</key><integer>29</integer>
399 // CHECK-NEXT:            <key>col</key><integer>5</integer>
400 // CHECK-NEXT:            <key>file</key><integer>0</integer>
401 // CHECK-NEXT:           </dict>
402 // CHECK-NEXT:          </array>
403 // CHECK-NEXT:         <key>end</key>
404 // CHECK-NEXT:          <array>
405 // CHECK-NEXT:           <dict>
406 // CHECK-NEXT:            <key>line</key><integer>32</integer>
407 // CHECK-NEXT:            <key>col</key><integer>3</integer>
408 // CHECK-NEXT:            <key>file</key><integer>0</integer>
409 // CHECK-NEXT:           </dict>
410 // CHECK-NEXT:           <dict>
411 // CHECK-NEXT:            <key>line</key><integer>32</integer>
412 // CHECK-NEXT:            <key>col</key><integer>4</integer>
413 // CHECK-NEXT:            <key>file</key><integer>0</integer>
414 // CHECK-NEXT:           </dict>
415 // CHECK-NEXT:          </array>
416 // CHECK-NEXT:        </dict>
417 // CHECK-NEXT:       </array>
418 // CHECK-NEXT:     </dict>
419 // CHECK-NEXT:     <dict>
420 // CHECK-NEXT:      <key>kind</key><string>control</string>
421 // CHECK-NEXT:      <key>edges</key>
422 // CHECK-NEXT:       <array>
423 // CHECK-NEXT:        <dict>
424 // CHECK-NEXT:         <key>start</key>
425 // CHECK-NEXT:          <array>
426 // CHECK-NEXT:           <dict>
427 // CHECK-NEXT:            <key>line</key><integer>32</integer>
428 // CHECK-NEXT:            <key>col</key><integer>3</integer>
429 // CHECK-NEXT:            <key>file</key><integer>0</integer>
430 // CHECK-NEXT:           </dict>
431 // CHECK-NEXT:           <dict>
432 // CHECK-NEXT:            <key>line</key><integer>32</integer>
433 // CHECK-NEXT:            <key>col</key><integer>4</integer>
434 // CHECK-NEXT:            <key>file</key><integer>0</integer>
435 // CHECK-NEXT:           </dict>
436 // CHECK-NEXT:          </array>
437 // CHECK-NEXT:         <key>end</key>
438 // CHECK-NEXT:          <array>
439 // CHECK-NEXT:           <dict>
440 // CHECK-NEXT:            <key>line</key><integer>32</integer>
441 // CHECK-NEXT:            <key>col</key><integer>7</integer>
442 // CHECK-NEXT:            <key>file</key><integer>0</integer>
443 // CHECK-NEXT:           </dict>
444 // CHECK-NEXT:           <dict>
445 // CHECK-NEXT:            <key>line</key><integer>32</integer>
446 // CHECK-NEXT:            <key>col</key><integer>8</integer>
447 // CHECK-NEXT:            <key>file</key><integer>0</integer>
448 // CHECK-NEXT:           </dict>
449 // CHECK-NEXT:          </array>
450 // CHECK-NEXT:        </dict>
451 // CHECK-NEXT:       </array>
452 // CHECK-NEXT:     </dict>
453 // CHECK-NEXT:     <dict>
454 // CHECK-NEXT:      <key>kind</key><string>event</string>
455 // CHECK-NEXT:      <key>location</key>
456 // CHECK-NEXT:      <dict>
457 // CHECK-NEXT:       <key>line</key><integer>32</integer>
458 // CHECK-NEXT:       <key>col</key><integer>7</integer>
459 // CHECK-NEXT:       <key>file</key><integer>0</integer>
460 // CHECK-NEXT:      </dict>
461 // CHECK-NEXT:      <key>ranges</key>
462 // CHECK-NEXT:      <array>
463 // CHECK-NEXT:        <array>
464 // CHECK-NEXT:         <dict>
465 // CHECK-NEXT:          <key>line</key><integer>32</integer>
466 // CHECK-NEXT:          <key>col</key><integer>7</integer>
467 // CHECK-NEXT:          <key>file</key><integer>0</integer>
468 // CHECK-NEXT:         </dict>
469 // CHECK-NEXT:         <dict>
470 // CHECK-NEXT:          <key>line</key><integer>32</integer>
471 // CHECK-NEXT:          <key>col</key><integer>11</integer>
472 // CHECK-NEXT:          <key>file</key><integer>0</integer>
473 // CHECK-NEXT:         </dict>
474 // CHECK-NEXT:        </array>
475 // CHECK-NEXT:      </array>
476 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
477 // CHECK-NEXT:      <key>extended_message</key>
478 // CHECK-NEXT:      <string>Assuming pointer value is null</string>
479 // CHECK-NEXT:      <key>message</key>
480 // CHECK-NEXT:      <string>Assuming pointer value is null</string>
481 // CHECK-NEXT:     </dict>
482 // CHECK-NEXT:     <dict>
483 // CHECK-NEXT:      <key>kind</key><string>control</string>
484 // CHECK-NEXT:      <key>edges</key>
485 // CHECK-NEXT:       <array>
486 // CHECK-NEXT:        <dict>
487 // CHECK-NEXT:         <key>start</key>
488 // CHECK-NEXT:          <array>
489 // CHECK-NEXT:           <dict>
490 // CHECK-NEXT:            <key>line</key><integer>32</integer>
491 // CHECK-NEXT:            <key>col</key><integer>7</integer>
492 // CHECK-NEXT:            <key>file</key><integer>0</integer>
493 // CHECK-NEXT:           </dict>
494 // CHECK-NEXT:           <dict>
495 // CHECK-NEXT:            <key>line</key><integer>32</integer>
496 // CHECK-NEXT:            <key>col</key><integer>8</integer>
497 // CHECK-NEXT:            <key>file</key><integer>0</integer>
498 // CHECK-NEXT:           </dict>
499 // CHECK-NEXT:          </array>
500 // CHECK-NEXT:         <key>end</key>
501 // CHECK-NEXT:          <array>
502 // CHECK-NEXT:           <dict>
503 // CHECK-NEXT:            <key>line</key><integer>37</integer>
504 // CHECK-NEXT:            <key>col</key><integer>3</integer>
505 // CHECK-NEXT:            <key>file</key><integer>0</integer>
506 // CHECK-NEXT:           </dict>
507 // CHECK-NEXT:           <dict>
508 // CHECK-NEXT:            <key>line</key><integer>37</integer>
509 // CHECK-NEXT:            <key>col</key><integer>5</integer>
510 // CHECK-NEXT:            <key>file</key><integer>0</integer>
511 // CHECK-NEXT:           </dict>
512 // CHECK-NEXT:          </array>
513 // CHECK-NEXT:        </dict>
514 // CHECK-NEXT:       </array>
515 // CHECK-NEXT:     </dict>
516 // CHECK-NEXT:     <dict>
517 // CHECK-NEXT:      <key>kind</key><string>event</string>
518 // CHECK-NEXT:      <key>location</key>
519 // CHECK-NEXT:      <dict>
520 // CHECK-NEXT:       <key>line</key><integer>37</integer>
521 // CHECK-NEXT:       <key>col</key><integer>3</integer>
522 // CHECK-NEXT:       <key>file</key><integer>0</integer>
523 // CHECK-NEXT:      </dict>
524 // CHECK-NEXT:      <key>ranges</key>
525 // CHECK-NEXT:      <array>
526 // CHECK-NEXT:        <array>
527 // CHECK-NEXT:         <dict>
528 // CHECK-NEXT:          <key>line</key><integer>37</integer>
529 // CHECK-NEXT:          <key>col</key><integer>3</integer>
530 // CHECK-NEXT:          <key>file</key><integer>0</integer>
531 // CHECK-NEXT:         </dict>
532 // CHECK-NEXT:         <dict>
533 // CHECK-NEXT:          <key>line</key><integer>37</integer>
534 // CHECK-NEXT:          <key>col</key><integer>8</integer>
535 // CHECK-NEXT:          <key>file</key><integer>0</integer>
536 // CHECK-NEXT:         </dict>
537 // CHECK-NEXT:        </array>
538 // CHECK-NEXT:      </array>
539 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
540 // CHECK-NEXT:      <key>extended_message</key>
541 // CHECK-NEXT:      <string>&apos;p&apos; initialized to a null pointer value</string>
542 // CHECK-NEXT:      <key>message</key>
543 // CHECK-NEXT:      <string>&apos;p&apos; initialized to a null pointer value</string>
544 // CHECK-NEXT:     </dict>
545 // CHECK-NEXT:     <dict>
546 // CHECK-NEXT:      <key>kind</key><string>control</string>
547 // CHECK-NEXT:      <key>edges</key>
548 // CHECK-NEXT:       <array>
549 // CHECK-NEXT:        <dict>
550 // CHECK-NEXT:         <key>start</key>
551 // CHECK-NEXT:          <array>
552 // CHECK-NEXT:           <dict>
553 // CHECK-NEXT:            <key>line</key><integer>37</integer>
554 // CHECK-NEXT:            <key>col</key><integer>3</integer>
555 // CHECK-NEXT:            <key>file</key><integer>0</integer>
556 // CHECK-NEXT:           </dict>
557 // CHECK-NEXT:           <dict>
558 // CHECK-NEXT:            <key>line</key><integer>37</integer>
559 // CHECK-NEXT:            <key>col</key><integer>5</integer>
560 // CHECK-NEXT:            <key>file</key><integer>0</integer>
561 // CHECK-NEXT:           </dict>
562 // CHECK-NEXT:          </array>
563 // CHECK-NEXT:         <key>end</key>
564 // CHECK-NEXT:          <array>
565 // CHECK-NEXT:           <dict>
566 // CHECK-NEXT:            <key>line</key><integer>38</integer>
567 // CHECK-NEXT:            <key>col</key><integer>3</integer>
568 // CHECK-NEXT:            <key>file</key><integer>0</integer>
569 // CHECK-NEXT:           </dict>
570 // CHECK-NEXT:           <dict>
571 // CHECK-NEXT:            <key>line</key><integer>38</integer>
572 // CHECK-NEXT:            <key>col</key><integer>3</integer>
573 // CHECK-NEXT:            <key>file</key><integer>0</integer>
574 // CHECK-NEXT:           </dict>
575 // CHECK-NEXT:          </array>
576 // CHECK-NEXT:        </dict>
577 // CHECK-NEXT:       </array>
578 // CHECK-NEXT:     </dict>
579 // CHECK-NEXT:     <dict>
580 // CHECK-NEXT:      <key>kind</key><string>control</string>
581 // CHECK-NEXT:      <key>edges</key>
582 // CHECK-NEXT:       <array>
583 // CHECK-NEXT:        <dict>
584 // CHECK-NEXT:         <key>start</key>
585 // CHECK-NEXT:          <array>
586 // CHECK-NEXT:           <dict>
587 // CHECK-NEXT:            <key>line</key><integer>38</integer>
588 // CHECK-NEXT:            <key>col</key><integer>3</integer>
589 // CHECK-NEXT:            <key>file</key><integer>0</integer>
590 // CHECK-NEXT:           </dict>
591 // CHECK-NEXT:           <dict>
592 // CHECK-NEXT:            <key>line</key><integer>38</integer>
593 // CHECK-NEXT:            <key>col</key><integer>3</integer>
594 // CHECK-NEXT:            <key>file</key><integer>0</integer>
595 // CHECK-NEXT:           </dict>
596 // CHECK-NEXT:          </array>
597 // CHECK-NEXT:         <key>end</key>
598 // CHECK-NEXT:          <array>
599 // CHECK-NEXT:           <dict>
600 // CHECK-NEXT:            <key>line</key><integer>38</integer>
601 // CHECK-NEXT:            <key>col</key><integer>7</integer>
602 // CHECK-NEXT:            <key>file</key><integer>0</integer>
603 // CHECK-NEXT:           </dict>
604 // CHECK-NEXT:           <dict>
605 // CHECK-NEXT:            <key>line</key><integer>38</integer>
606 // CHECK-NEXT:            <key>col</key><integer>7</integer>
607 // CHECK-NEXT:            <key>file</key><integer>0</integer>
608 // CHECK-NEXT:           </dict>
609 // CHECK-NEXT:          </array>
610 // CHECK-NEXT:        </dict>
611 // CHECK-NEXT:       </array>
612 // CHECK-NEXT:     </dict>
613 // CHECK-NEXT:     <dict>
614 // CHECK-NEXT:      <key>kind</key><string>event</string>
615 // CHECK-NEXT:      <key>location</key>
616 // CHECK-NEXT:      <dict>
617 // CHECK-NEXT:       <key>line</key><integer>38</integer>
618 // CHECK-NEXT:       <key>col</key><integer>7</integer>
619 // CHECK-NEXT:       <key>file</key><integer>0</integer>
620 // CHECK-NEXT:      </dict>
621 // CHECK-NEXT:      <key>ranges</key>
622 // CHECK-NEXT:      <array>
623 // CHECK-NEXT:        <array>
624 // CHECK-NEXT:         <dict>
625 // CHECK-NEXT:          <key>line</key><integer>38</integer>
626 // CHECK-NEXT:          <key>col</key><integer>8</integer>
627 // CHECK-NEXT:          <key>file</key><integer>0</integer>
628 // CHECK-NEXT:         </dict>
629 // CHECK-NEXT:         <dict>
630 // CHECK-NEXT:          <key>line</key><integer>38</integer>
631 // CHECK-NEXT:          <key>col</key><integer>8</integer>
632 // CHECK-NEXT:          <key>file</key><integer>0</integer>
633 // CHECK-NEXT:         </dict>
634 // CHECK-NEXT:        </array>
635 // CHECK-NEXT:      </array>
636 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
637 // CHECK-NEXT:      <key>extended_message</key>
638 // CHECK-NEXT:      <string>Dereference of null pointer (loaded from variable &apos;p&apos;)</string>
639 // CHECK-NEXT:      <key>message</key>
640 // CHECK-NEXT:      <string>Dereference of null pointer (loaded from variable &apos;p&apos;)</string>
641 // CHECK-NEXT:     </dict>
642 // CHECK-NEXT:    </array>
643 // CHECK-NEXT:    <key>description</key><string>Dereference of null pointer (loaded from variable &apos;p&apos;)</string>
644 // CHECK-NEXT:    <key>category</key><string>Logic error</string>
645 // CHECK-NEXT:    <key>type</key><string>Dereference of null pointer</string>
646 // CHECK-NEXT:    <key>check_name</key><string>core.NullDereference</string>
647 // CHECK-NEXT:   <key>issue_context_kind</key><string>function</string>
648 // CHECK-NEXT:   <key>issue_context</key><string>testTrackConstraintBRVisitorIsTrackingTurnedOn</string>
649 // CHECK-NEXT:   <key>issue_hash</key><string>11</string>
650 // CHECK-NEXT:   <key>location</key>
651 // CHECK-NEXT:   <dict>
652 // CHECK-NEXT:    <key>line</key><integer>38</integer>
653 // CHECK-NEXT:    <key>col</key><integer>7</integer>
654 // CHECK-NEXT:    <key>file</key><integer>0</integer>
655 // CHECK-NEXT:   </dict>
656 // CHECK-NEXT:   </dict>
657 // CHECK-NEXT:  </array>
658