Lines Matching defs:call
618 function_call_descr(const function_call *call)
620 if ((call->func->tn_op == ADDR || call->func->tn_op == LOAD)
621 && call->func->u.ops.left->tn_op == NAME)
622 return call->func->u.ops.left->u.sym->s_name;
623 return type_name(call->func->tn_type->t_subt);
2016 case CALL:;
2017 const function_call *call = tn->u.call;
2018 for (size_t i = 0, n = call->args_len; i < n; i++)
2019 use(call->args[i]);
2975 if (tn->tn_op == CALL
2976 && tn->u.call->func->tn_op == ADDR
2977 && tn->u.call->func->u.ops.left->tn_op == NAME) {
2978 *out_name = tn->u.call->func->u.ops.left->u.sym->s_name;
3035 rn->u.call->args_len >= 1 &&
3036 is_const_char_pointer(rn->u.call->args[0])) {
3037 /* call to '%s' effectively discards 'const' from argument */
3044 rn->u.call->args_len >= 2 &&
3045 is_const_pointer(rn->u.call->args[1])) {
3046 /* call to '%s' effectively discards 'const' from argument */
3052 check_assign_void_pointer_compat(op_t op, const function_call *call, int arg,
3080 function_call_descr(call), qualifiers + 1);
3175 check_assign_types_compatible(op_t op, const function_call *call, int arg,
3204 if (check_assign_void_pointer_compat(op, call, arg,
3289 typeok_op(op_t op, const function_call *call, int arg,
3338 if (!check_assign_types_compatible(op, call, arg, ln, rn))
3486 typeok(op_t op, const function_call *call, int arg,
3503 if (!typeok_op(op, call, arg, ln, ltp, lt, rn, rtp, rt))
4529 add_function_argument(function_call *call, tnode_t *arg)
4539 if (call->args_len >= call->args_cap) {
4540 call->args_cap += 8;
4542 call->args_cap * sizeof(*call->args), "tnode*[]");
4543 if (call->args_len > 0)
4544 memcpy(new_args, call->args,
4545 call->args_len * sizeof(*call->args));
4546 call->args = new_args;
4548 call->args[call->args_len++] = arg;
4558 check_prototype_argument(const function_call *call, int arg,
4564 if (typeok(FARG, call, arg, ln, tn)) {
4579 check_function_arguments(const function_call *call)
4581 type_t *ftp = call->func->tn_type->t_subt;
4588 int narg = (int)call->args_len;
4598 tnode_t *arg = call->args[i];
4620 call->args[i] = arg;
4623 ? check_prototype_argument(call, i + 1, param->s_type, arg)
4625 call->args[i] = arg;
4653 return_type(const function_call *call)
4655 const tnode_t *func = call->func;
4660 && call->args_len > 0
4661 && call->args[0]->tn_type->t_tspec == PTR)
4662 return call->args[0]->tn_type->t_subt;
4667 build_function_call(tnode_t *func, bool sys, function_call *call)
4673 call->func = func;
4674 check_ctype_function_call(call);
4677 call->func = func;
4681 /* cannot call '%s', must be a function */
4686 check_function_arguments(call);
4689 ntn->tn_op = CALL;
4690 ntn->tn_type = return_type(call);
4692 ntn->u.call = call;
4889 const function_call *call = tn->u.call;
4890 if (call->args_len == 4 || call->args_len == 5)
4891 check_snprintb(call);
4941 * fcall whether the expression is a function call
4942 * retval_discarded whether the return value of a function call
4959 bool is_direct = op == CALL
4960 && tn->u.call->func->tn_op == ADDR
4961 && tn->u.call->func->u.ops.left->tn_op == NAME;
4962 if (op == CALL) {
4963 const function_call *call = tn->u.call;
4965 check_expr_call(tn, call->func,
4968 check_expr_misc(call->func, false, false, false, is_direct,
4970 for (size_t i = 0, n = call->args_len; i < n; i++)
4971 check_expr_misc(call->args[i],