-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathsal.ql
More file actions
24 lines (22 loc) · 735 Bytes
/
sal.ql
File metadata and controls
24 lines (22 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import cpp
predicate argsOrPlaceholder(Attribute a, int index, int start_line, string name, string value) {
if exists(a.getAnArgument())
then
exists(AttributeArgument arg | arg = a.getAnArgument() |
index = arg.getIndex() and
start_line = arg.getLocation().getStartLine() and
name = arg.getName() and
value = arg.getValueText()
)
else (
index = -1 and
start_line = a.getLocation().getStartLine() and
name = "" and
value = ""
)
}
from Parameter p, Attribute a, int arg_index, int arg_line, string arg_name, string arg_value
where
a = p.getAnAttribute() and
argsOrPlaceholder(a, arg_index, arg_line, arg_name, arg_value)
select arg_line, p, a, arg_index, arg_name, arg_value