From 6d0dd763af60498686632acc0446f7bc2cf503fc Mon Sep 17 00:00:00 2001 From: George Karpenkov Date: Tue, 23 Jan 2018 20:01:31 +0000 Subject: [analyzer] Mark lines as relevant even if they weren't executed but have a label attached Differential Revision: https://reviews.llvm.org/D42320 llvm-svn: 323251 --- .../html_diagnostics/relevant_lines/notexecutedlines.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 clang/test/Analysis/html_diagnostics/relevant_lines/notexecutedlines.c (limited to 'clang/test') diff --git a/clang/test/Analysis/html_diagnostics/relevant_lines/notexecutedlines.c b/clang/test/Analysis/html_diagnostics/relevant_lines/notexecutedlines.c new file mode 100644 index 00000000000..3c723aa9334 --- /dev/null +++ b/clang/test/Analysis/html_diagnostics/relevant_lines/notexecutedlines.c @@ -0,0 +1,12 @@ +int f() { + int zzz = 200; + zzz += 100; + return 0; +} + +// Show line with the warning even if it wasn't executed (e.g. warning given +// by path-insensitive analysis). +// RUN: rm -rf %t.output +// RUN: %clang_analyze_cc1 -analyze -analyzer-checker=core,deadcode -analyzer-output html -o %t.output %s +// RUN: cat %t.output/* | FileCheck %s --match-full-lines +// CHECK: var relevant_lines = {"1": {"3": 1}}; -- cgit v1.2.3