blob: 81b2cfa588e3214756a1c7e96ab9c7f9f3c008fe [file] [log] [blame]
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00001// RUN: rm -rf %t
Ted Kremenek565e4652010-02-05 02:06:54 +00002// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-check-objc-mem -o %t %s
Daniel Dunbarad451cc2009-11-05 02:11:37 +00003// RUN: cat %t/*.html | FileCheck %s
4
5// CHECK: <h3>Annotated Source Code</h3>
6// CHECK: Dereference of null pointer
Daniel Dunbarae3c16c2008-10-04 20:46:41 +00007
8void f0(int x) {
9 int *p = &x;
10
11 if (x > 10) {
12 if (x == 22)
13 p = 0;
14 }
15
16 *p = 10;
17}
18
19