Lines Matching refs:expr

25 static int does_inc_dec(struct expression *expr)  in does_inc_dec()  argument
27 if (expr->type == EXPR_PREOP || expr->type == EXPR_POSTOP) { in does_inc_dec()
28 if (expr->op == SPECIAL_INCREMENT || expr->op == SPECIAL_DECREMENT) in does_inc_dec()
30 return does_inc_dec(expr->unop); in does_inc_dec()
64 static void check_or(struct expression *expr) in check_or() argument
68 left = strip_expr(expr->left); in check_or()
69 right = strip_expr(expr->right); in check_or()
81 static int is_kernel_min_macro(struct expression *expr) in is_kernel_min_macro() argument
87 macro = get_macro_name(expr->pos); in is_kernel_min_macro()
98 static void check_and(struct expression *expr) in check_and() argument
102 if (is_kernel_min_macro(expr)) in check_and()
105 left = strip_expr(expr->left); in check_and()
106 right = strip_expr(expr->right); in check_and()
118 static void match_logic(struct expression *expr) in match_logic() argument
120 if (expr->type != EXPR_LOGICAL) in match_logic()
123 if (expr->op == SPECIAL_LOGICAL_OR) in match_logic()
124 check_or(expr); in match_logic()
125 if (expr->op == SPECIAL_LOGICAL_AND) in match_logic()
126 check_and(expr); in match_logic()
129 static int is_unconstant_macro(struct expression *expr) in is_unconstant_macro() argument
133 macro = get_macro_name(expr->pos); in is_unconstant_macro()
141 static void match_condition(struct expression *expr) in match_condition() argument
145 if (expr->type != EXPR_BINOP) in match_condition()
147 if (expr->op == '|') { in match_condition()
148 if (get_value(expr->left, &sval) || get_value(expr->right, &sval)) in match_condition()
153 if (expr->op != '&') in match_condition()
156 if (get_macro_name(expr->pos)) in match_condition()
158 if (is_unconstant_macro(expr->left) || is_unconstant_macro(expr->right)) in match_condition()
161 if ((get_value(expr->left, &sval) && sval.value == 0) || in match_condition()
162 (get_value(expr->right, &sval) && sval.value == 0)) in match_condition()
166 static void match_binop(struct expression *expr) in match_binop() argument
170 if (expr->op != '&') in match_binop()
172 if (!get_value(expr, &sval) || sval.value != 0) in match_binop()
174 if (get_macro_name(expr->pos)) in match_binop()
176 if (!get_value(expr->left, &left) || !get_value(expr->right, &right)) in match_binop()