xref: /llvm-project/clang/test/Coverage/html-diagnostics.c (revision 9642cc6a9da62b8c41dbaab35a5b085b096ac70f)
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-check-objc-mem -o %t %s
3 // RUN: cat %t/*.html | FileCheck %s
4 
5 // CHECK: <h3>Annotated Source Code</h3>
6 
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}}
10 
11 void 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 
23