Skip to content

Commit 513ead6

Browse files
committed
Python: Document CallArgs.qll.
1 parent 843c5c6 commit 513ead6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

python/ql/src/Expressions/CallArgs.qll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/** INTERNAL - Methods used for queries relating to the correct invocation of functions. */
2+
13
import python
24
import Testing.Mox
35

@@ -71,36 +73,38 @@ private int positional_arg_count_for_call(Call call, Value callable) {
7173
)
7274
}
7375

76+
/** Gets the number of arguments in `call`. */
7477
int arg_count_objectapi(Call call) {
7578
result = count(call.getAnArg()) + varargs_length_objectapi(call) + count(call.getAKeyword())
7679
}
7780

81+
/** Gets the number of arguments in `call`. */
7882
int arg_count(Call call) {
7983
result = count(call.getAnArg()) + varargs_length(call) + count(call.getAKeyword())
8084
}
8185

82-
/* Gets a call corresponding to the given class or function*/
86+
/** Gets a call corresponding to the given class or function. */
8387
private ControlFlowNode get_a_call_objectapi(Object callable) {
8488
result = callable.(ClassObject).getACall()
8589
or
8690
result = callable.(FunctionObject).getACall()
8791
}
8892

89-
/* Gets a call corresponding to the given class or function*/
93+
/** Gets a call corresponding to the given class or function. */
9094
private ControlFlowNode get_a_call(Value callable) {
9195
result = callable.(ClassValue).getACall()
9296
or
9397
result = callable.(FunctionValue).getACall()
9498
}
9599

96-
/* Gets the function object corresponding to the given class or function*/
100+
/** Gets the function object corresponding to the given class or function. */
97101
FunctionObject get_function_or_initializer_objectapi(Object func_or_cls) {
98102
result = func_or_cls.(FunctionObject)
99103
or
100104
result = func_or_cls.(ClassObject).declaredAttribute("__init__")
101105
}
102106

103-
/* Gets the function object corresponding to the given class or function*/
107+
/** Gets the function object corresponding to the given class or function. */
104108
FunctionValue get_function_or_initializer(Value func_or_cls) {
105109
result = func_or_cls.(FunctionValue)
106110
or

0 commit comments

Comments
 (0)