xref: /llvm-project/clang/test/Coverage/html-diagnostics.c (revision dbb846a463a12612a5e43d1dfd6faeb11ec45d1a)
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t %s
3 // RUN: cat %t/*.html | FileCheck %s
4 
5 // Because of the glob (*.html)
6 // REQUIRES: shell
7 
8 // CHECK: <h3>Annotated Source Code</h3>
9 
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}}
13 
14 void 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 
26