Skip to content

Commit d9d3027

Browse files
committed
Rust: Make improvements to getArgString based on PR comments
1 parent cd2038a commit d9d3027

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rust/ql/test/utils/InlineFlowTest.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ private module FlowTestImpl implements InputSig<Location, RustDataFlow> {
2626
result = src.asExpr().(CallExpr).getArgList().getArg(0).toString()
2727
}
2828

29+
bindingset[src, sink]
2930
string getArgString(DataFlow::Node src, DataFlow::Node sink) {
30-
(if exists(getSourceArgString(src)) then result = getSourceArgString(src) else result = "") and
31+
(
32+
result = getSourceArgString(src)
33+
or
34+
not exists(getSourceArgString(src)) and result = ""
35+
) and
3136
exists(sink)
3237
}
3338

0 commit comments

Comments
 (0)