From f0cadcd9f385d36dc751cdb32476b32ec43306b5 Mon Sep 17 00:00:00 2001 From: Devin Coughlin Date: Thu, 3 Aug 2017 18:12:22 +0000 Subject: [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output This change adds support for cross-file diagnostic paths in html output. If the diagnostic path is not cross-file, there is no change in the output. Patch by Vlad Tsyrklevich! Differential Revision: https://reviews.llvm.org/D30406 llvm-svn: 309968 --- clang/test/Coverage/html-diagnostics.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/test/Coverage/html-diagnostics.c') diff --git a/clang/test/Coverage/html-diagnostics.c b/clang/test/Coverage/html-diagnostics.c index 045943ae8b1..34b86cd9829 100644 --- a/clang/test/Coverage/html-diagnostics.c +++ b/clang/test/Coverage/html-diagnostics.c @@ -1,11 +1,18 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t %s // RUN: find %t -name "*.html" -exec cat "{}" ";" | FileCheck %s +// +// RUN: rm -rf %t +// RUN: %clang_cc1 -analyze -analyzer-output=html-single-file -analyzer-checker=core -o %t %s +// RUN: find %t -name "*.html" -exec cat "{}" ";" | FileCheck %s // REQUIRES: staticanalyzer // CHECK:

Annotated Source Code

+// Make sure it's not generated as a multi-file HTML output +// CHECK-NOT:

{{.*}} + // Without tweaking expr, the expr would hit to the line below // emitted to the output as comment. // CHECK: {{[D]ereference of null pointer}} -- cgit v1.2.3