Skip to content

Commit 83b87e2

Browse files
committed
add test coverage
1 parent 1828d49 commit 83b87e2

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
'version': 0,
3+
'use-external-names': true,
4+
'roots': [
5+
{
6+
'name': 'DIR',
7+
'type': 'directory',
8+
'contents': [
9+
{
10+
'name': 'taint-generic-config-virtual.yaml',
11+
'type': 'file',
12+
'external-contents': 'DIR/taint-generic-config.yaml'
13+
}
14+
]
15+
}
16+
]
17+
}

clang/test/Analysis/taint-generic.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// RUN: rm -rf %t && mkdir %t
2+
// RUN: sed -e "s|DIR|%/S/Inputs|g" %S/Inputs/taint-generic-config-vfs.json > %t/taint-generic-config-vfs.json
3+
14
// RUN: %clang_analyze_cc1 -Wno-format-security -Wno-pointer-to-int-cast \
25
// RUN: -Wno-incompatible-library-redeclaration -verify %s \
36
// RUN: -analyzer-checker=optin.taint.GenericTaint \
@@ -6,7 +9,8 @@
69
// RUN: -analyzer-checker=security.ArrayBound \
710
// RUN: -analyzer-checker=debug.ExprInspection \
811
// RUN: -analyzer-config \
9-
// RUN: optin.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config.yaml
12+
// RUN: optin.taint.TaintPropagation:Config=%S/Inputs/taint-generic-config-virtual.yaml \
13+
// RUN: -ivfsoverlay %t/taint-generic-config-vfs.json
1014

1115
// RUN: %clang_analyze_cc1 -Wno-format-security -Wno-pointer-to-int-cast \
1216
// RUN: -Wno-incompatible-library-redeclaration -verify %s \

0 commit comments

Comments
 (0)