summaryrefslogtreecommitdiff
path: root/test/Analysis/html_diagnostics/relevant_lines/unused_header.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/html_diagnostics/relevant_lines/unused_header.c')
-rw-r--r--test/Analysis/html_diagnostics/relevant_lines/unused_header.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Analysis/html_diagnostics/relevant_lines/unused_header.c b/test/Analysis/html_diagnostics/relevant_lines/unused_header.c
new file mode 100644
index 0000000000000..4b77c651eddd9
--- /dev/null
+++ b/test/Analysis/html_diagnostics/relevant_lines/unused_header.c
@@ -0,0 +1,19 @@
+#include "header.h"
+
+int f(int coin) {
+ if (coin) {
+ int *x = 0;
+ return *x;
+ } else {
+ return 0;
+ }
+}
+
+int v(int coin) {
+ return coin;
+}
+
+// RUN: rm -rf %t.output
+// RUN: %clang_analyze_cc1 -analyze -analyzer-checker=core -analyzer-output html -o %t.output %s
+// RUN: cat %t.output/* | FileCheck %s --match-full-lines
+// CHECK: var relevant_lines = {"1": {"3": 1, "4": 1, "5": 1, "6": 1}};