File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
docs/codeql/codeql-language-guides Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -140,13 +140,13 @@ The following example finds calls to ``String.init(format:_:)`` where the format
140140 import swift
141141 import codeql.swift.dataflow.DataFlow
142142
143- from CallExpr call, Method method, Expr sinkExpr
143+ from CallExpr call, Method method, DataFlow::Node sinkNode
144144 where
145145 call.getStaticTarget() = method and
146146 method.hasQualifiedName("String", "init(format:_:)") and
147- sinkExpr = call.getArgument(0).getExpr() and
147+ sinkNode.asExpr() = call.getArgument(0).getExpr() and
148148 not exists(StringLiteralExpr sourceLiteral |
149- DataFlow::localFlow(DataFlow::exprNode(sourceLiteral), DataFlow::exprNode(sinkExpr) )
149+ DataFlow::localFlow(DataFlow::exprNode(sourceLiteral), sinkNode )
150150 )
151151 select call, "Format argument to " + method.getName() + " isn't hard-coded."
152152
You can’t perform that action at this time.
0 commit comments