32 lines · c
1// RUN: rm -rf %t2// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t %s3// RUN: find %t -name "*.html" -exec cat "{}" ";" | FileCheck %s4//5// RUN: rm -rf %t6// RUN: %clang_cc1 -analyze -analyzer-output=html-single-file -analyzer-checker=core -o %t %s7// RUN: find %t -name "*.html" -exec cat "{}" ";" | FileCheck %s8 9// REQUIRES: staticanalyzer10 11// CHECK: <h3>Annotated Source Code</h3>12 13// Make sure it's not generated as a multi-file HTML output14// CHECK-NOT: <h4 class=FileName>{{.*}}15 16// Without tweaking expr, the expr would hit to the line below17// emitted to the output as comment.18// CHECK: {{[D]ereference of null pointer}}19 20void f0(int x) {21 int *p = &x;22 23 if (x > 10) {24 if (x == 22)25 p = 0;26 }27 28 *p = 10;29}30 31 32