Print this page
12724 update smatch to 0.6.1-rc1-il-5

*** 149,158 **** --- 149,161 ---- static void handle_non_struct_assignments(struct expression *left, struct expression *right) { struct symbol *type; struct expression *assign; + while (right && right->type == EXPR_ASSIGNMENT) + right = strip_parens(right->left); + type = get_type(left); if (!type) return; if (type->type == SYM_PTR) { left = deref_expression(left);
*** 232,249 **** struct expression *left_member; struct expression *right_member; struct expression *assign; int op = '.'; - if (__in_fake_assign) return; faked_expression = faked; left = strip_expr(left); right = strip_expr(right); struct_type = get_struct_type(left); if (!struct_type) { /* * This is not a struct assignment obviously. But this is where * memcpy() is handled so it feels like a good place to add this --- 235,254 ---- struct expression *left_member; struct expression *right_member; struct expression *assign; int op = '.'; if (__in_fake_assign) return; faked_expression = faked; left = strip_expr(left); right = strip_expr(right); + if (left->type == EXPR_PREOP && left->op == '*' && is_pointer(left)) + left = preop_expression(left, '('); + struct_type = get_struct_type(left); if (!struct_type) { /* * This is not a struct assignment obviously. But this is where * memcpy() is handled so it feels like a good place to add this