blob: 410ee2acd5fd46917bb39e8627e7205d11c77b4a [file] [log] [blame]
Daniel Dunbar8b576972009-11-08 01:45:36 +00001// RUN: rm -rf %t
Argyrios Kyrtzidis9eb02df2011-02-28 19:49:42 +00002// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t %s
Andrew Trick8cdb3f72010-10-20 23:52:37 +00003// RUN: cat %t/*.html | FileCheck %s
Daniel Dunbaraef52f42009-11-05 02:11:37 +00004
Alp Tokerdbb846a2013-10-25 22:30:07 +00005// Because of the glob (*.html)
6// REQUIRES: shell
7
Daniel Dunbaraef52f42009-11-05 02:11:37 +00008// CHECK: <h3>Annotated Source Code</h3>
Andrew Trick9642cc62010-10-21 03:59:06 +00009
10// Without tweaking expr, the expr would hit to the line below
11// emitted to the output as comment.
12// CHECK: {{[D]ereference of null pointer}}
Daniel Dunbar23bd6cc2008-10-04 20:46:41 +000013
14void f0(int x) {
15 int *p = &x;
16
17 if (x > 10) {
18 if (x == 22)
19 p = 0;
20 }
21
22 *p = 10;
23}
24
25