[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Coverage / html-diagnostics.c
blob34b86cd982917b6a7bb23b099a43e7f74c39200f
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t %s
3 // RUN: find %t -name "*.html" -exec cat "{}" ";" | FileCheck %s
4 //
5 // RUN: rm -rf %t
6 // RUN: %clang_cc1 -analyze -analyzer-output=html-single-file -analyzer-checker=core -o %t %s
7 // RUN: find %t -name "*.html" -exec cat "{}" ";" | FileCheck %s
9 // REQUIRES: staticanalyzer
11 // CHECK: <h3>Annotated Source Code</h3>
13 // Make sure it's not generated as a multi-file HTML output
14 // CHECK-NOT: <h4 class=FileName>{{.*}}
16 // Without tweaking expr, the expr would hit to the line below
17 // emitted to the output as comment.
18 // CHECK: {{[D]ereference of null pointer}}
20 void f0(int x) {
21 int *p = &x;
23 if (x > 10) {
24 if (x == 22)
25 p = 0;
28 *p = 10;