blob: 4f1b0e3763b8d55cc9a8108ca4f04f1f031b3f7a [file] [log] [blame]
Daniel Dunbar8b576972009-11-08 01:45:361// RUN: rm -rf %t
Argyrios Kyrtzidis9eb02df2011-02-28 19:49:422// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t %s
Andrew Trick8cdb3f72010-10-20 23:52:373// RUN: cat %t/*.html | FileCheck %s
Daniel Dunbaraef52f42009-11-05 02:11:374
5// CHECK: <h3>Annotated Source Code</h3>
Andrew Trick9642cc62010-10-21 03:59:066
7// Without tweaking expr, the expr would hit to the line below
8// emitted to the output as comment.
9// CHECK: {{[D]ereference of null pointer}}
Daniel Dunbar23bd6cc2008-10-04 20:46:4110
11void f0(int x) {
12 int *p = &x;
13
14 if (x > 10) {
15 if (x == 22)
16 p = 0;
17 }
18
19 *p = 10;
20}
21
22