Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 92eb857

Browse files
committed
C#: Add documentation.
1 parent 4274854 commit 92eb857

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

csharp/ql/src/semmle/code/csharp/dataflow/LibraryTypeDataFlow.qll

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,6 @@ class CallableFlowSourceArg extends CallableFlowSource, TCallableFlowSourceArg {
184184
override Expr getSource(Call c) { result = c.getArgument(getArgumentIndex()) }
185185
}
186186

187-
/** Gets an argument flow source for callable `callable` with argument `i`. */
188-
CallableFlowSourceArg getFlowSourceArg(SourceDeclarationCallable callable, int i) {
189-
i = result.getArgumentIndex() and
190-
hasArgumentPosition(callable, i)
191-
}
192-
193187
/** A flow source in a call to a library callable: output from delegate argument. */
194188
class CallableFlowSourceDelegateArg extends CallableFlowSource, TCallableFlowSourceDelegateArg {
195189
override string toString() { result = "output from argument " + getArgumentIndex().toString() }
@@ -243,17 +237,25 @@ class CallableFlowSinkArg extends CallableFlowSink, TCallableFlowSinkArg {
243237
}
244238
}
245239

246-
/** Gets an argument flow sink for callable `callable` with argument `i`. */
240+
/** Gets the flow source for argument `i` of callable `callable`. */
241+
CallableFlowSourceArg getFlowSourceArg(SourceDeclarationCallable callable, int i) {
242+
i = result.getArgumentIndex() and
243+
hasArgumentPosition(callable, i)
244+
}
245+
246+
/** Gets the flow sink for argument `i` of callable `callable`. */
247247
CallableFlowSinkArg getFlowSinkArg(SourceDeclarationCallable callable, int i) {
248248
i = result.getArgumentIndex() and
249249
hasArgumentPosition(callable, i)
250250
}
251251

252+
/** Gets the flow source for argument `i` of delegate `callable`. */
252253
CallableFlowSourceDelegateArg getDelegateFlowSourceArg(SourceDeclarationCallable callable, int i) {
253254
i = result.getArgumentIndex() and
254255
hasDelegateArgumentPosition(callable, i)
255256
}
256257

258+
/** Gets the flow sink for the `j`th argument of the delegate at argument `i` of `callable`. */
257259
CallableFlowSinkDelegateArg getDelegateFlowSinkArg(SourceDeclarationCallable callable, int i, int j) {
258260
result = TCallableFlowSinkDelegateArg(i, j) and
259261
hasDelegateArgumentPosition2(callable, i, j)

0 commit comments

Comments
 (0)