diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2018-01-23 20:01:31 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2018-01-23 20:01:31 +0000 |
commit | 6d0dd763af60498686632acc0446f7bc2cf503fc (patch) | |
tree | 100909641914eededf8a74eb1d43336d4aea6d40 /clang/test/Analysis/html_diagnostics | |
parent | d5e8a260bb537e6ee7303061e0b4a380cd1c920c (diff) | |
download | bcm5719-llvm-6d0dd763af60498686632acc0446f7bc2cf503fc.tar.gz bcm5719-llvm-6d0dd763af60498686632acc0446f7bc2cf503fc.zip |
[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
Diffstat (limited to 'clang/test/Analysis/html_diagnostics')
-rw-r--r-- | clang/test/Analysis/html_diagnostics/relevant_lines/notexecutedlines.c | 12 |
1 files changed, 12 insertions, 0 deletions
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}}; |