Skip to content

Commit 44472c3

Browse files
committed
Rust: Discard sources with spaces in inline flow tests
1 parent de9d102 commit 44472c3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rust/ql/lib/utils/test/InlineFlowTest.qll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ private module FlowTestImpl implements InputSig<Location, RustDataFlow> {
3434
result = src.asExpr().(CallExprCfgNode).getArgument(0).toString()
3535
or
3636
sourceNode(src, _) and
37-
exists(CallExprBase call |
38-
call = src.(Node::FlowSummaryNode).getSourceElement().getCall() and
39-
result = call.getArgList().getArg(0).toString()
40-
)
37+
result = src.(Node::FlowSummaryNode).getSourceElement().getCall().getArg(0).toString() and
38+
// Don't use the result if it contains spaces
39+
not result.matches("% %")
4140
}
4241

4342
bindingset[src, sink]

0 commit comments

Comments
 (0)