Print this page
11972 resync smatch
*** 74,95 ****
return s1;
return &merged;
}
- static bool is_local_var(struct expression *expr)
- {
- struct symbol *sym;
-
- if (!expr || expr->type != EXPR_SYMBOL)
- return false;
- sym = expr->symbol;
- if (!(sym->ctype.modifiers & MOD_TOPLEVEL))
- return true;
- return false;
- }
-
static void match_assign(struct expression *expr)
{
struct expression *left;
struct symbol *right_sym;
char *name;
--- 74,83 ----
*** 98,108 ****
int param;
if (expr->op != '=')
return;
left = strip_expr(expr->left);
! if (is_local_var(left))
return;
right_sym = expr_to_sym(expr->right);
if (!right_sym)
return;
--- 86,96 ----
int param;
if (expr->op != '=')
return;
left = strip_expr(expr->left);
! if (is_local_variable(left))
return;
right_sym = expr_to_sym(expr->right);
if (!right_sym)
return;