| 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 |
// REQUIRES: staticanalyzer |
| 6 |
|
| 7 |
// CHECK: <!-- FILENAME html-multifile-diagnostics.h --> |
| 8 |
|
| 9 |
// CHECK: <h3>Annotated Source Code</h3> |
| 10 |
|
| 11 |
// Make sure it's generated as multi-file HTML output |
| 12 |
// CHECK: <h4 class=FileName>{{.*}}html-multifile-diagnostics.c</h4> |
| 13 |
// CHECK: <h4 class=FileName>{{.*}}html-multifile-diagnostics.h</h4> |
| 14 |
|
| 15 |
// Without tweaking expr, the expr would hit to the line below |
| 16 |
// emitted to the output as comment. |
| 17 |
// CHECK: {{[D]ereference of null pointer}} |
| 18 |
|
| 19 |
#include "html-multifile-diagnostics.h" |
| 20 |
|
| 21 |
void f0(void) { |
| 22 |
f1((int*)0); |
| 23 |
} |