Skip to content

Commit

Permalink
preparation
Browse files Browse the repository at this point in the history
  • Loading branch information
thradams committed Mar 22, 2024
1 parent 5b0a055 commit 6fc6941
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
17 changes: 13 additions & 4 deletions src/flow_visit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1345,15 +1345,24 @@ static int compare_function_arguments2(struct parser_ctx* ctx,

if (type_is_any_owner(&p_current_parameter_type->type))
{
struct object parameter_object = make_object(&p_current_parameter_type->type, NULL, p_current_argument->expression);

/*bool check_initialized_source = true;
if (type_is_pointer_to_out(&p_current_parameter_type->type))
{
check_initialized_source = false;
}*/

object_assignment(ctx,
p_argument_object,
&p_current_argument->expression->type,
NULL, /*dest object*/
NULL, //&parameter_object, /*dest object*/
&p_current_parameter_type->type,
p_current_argument->expression->first_token,
bool_source_zero_value,
OBJECT_STATE_UNINITIALIZED,
ASSIGMENT_TYPE_PARAMETER);
object_destroy(&parameter_object);
}
else
{
Expand Down Expand Up @@ -2497,12 +2506,12 @@ static void flow_visit_declarator(struct flow_visit_ctx* ctx, struct declarator*
if (p_declarator->object.pointed)
{
set_object(&t2, p_declarator->object.pointed, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL));
}
}
type_destroy(&t2);
}
}
#endif
}
}
}

/*if (p_declarator->pointer)
{
Expand Down
17 changes: 13 additions & 4 deletions src/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -35124,15 +35124,24 @@ static int compare_function_arguments2(struct parser_ctx* ctx,

if (type_is_any_owner(&p_current_parameter_type->type))
{
struct object parameter_object = make_object(&p_current_parameter_type->type, NULL, p_current_argument->expression);

/*bool check_initialized_source = true;
if (type_is_pointer_to_out(&p_current_parameter_type->type))
{
check_initialized_source = false;
}*/

object_assignment(ctx,
p_argument_object,
&p_current_argument->expression->type,
NULL, /*dest object*/
NULL, //&parameter_object, /*dest object*/
&p_current_parameter_type->type,
p_current_argument->expression->first_token,
bool_source_zero_value,
OBJECT_STATE_UNINITIALIZED,
ASSIGMENT_TYPE_PARAMETER);
object_destroy(&parameter_object);
}
else
{
Expand Down Expand Up @@ -36276,12 +36285,12 @@ static void flow_visit_declarator(struct flow_visit_ctx* ctx, struct declarator*
if (p_declarator->object.pointed)
{
set_object(&t2, p_declarator->object.pointed, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL));
}
}
type_destroy(&t2);
}
}
#endif
}
}
}

/*if (p_declarator->pointer)
{
Expand Down

0 comments on commit 6fc6941

Please sign in to comment.