Skip to main contentModule div_mul
Source use super::DivideBeforeMultiply; ๐ use crate::linter::LateLintPass; ๐ use crate::linter::LintContext; ๐ use crate::sol::Severity; ๐ use crate::sol::SolLint; ๐ use crate::sol::analysis::is_revert_call; ๐ use crate::sol::analysis::loop_update; ๐ use crate::sol::analysis::tuple_elems; ๐ use solar::sema::Gcx; ๐ use solar::sema::builtins::Builtin; ๐ use solar::sema::hir::BinOpKind; ๐ use solar::sema::hir::Block; ๐ use solar::sema::hir::Expr; ๐ use solar::sema::hir::ExprKind; ๐ use solar::sema::hir::Function; ๐ use solar::sema::hir::Stmt; ๐ use solar::sema::hir::StmtKind; ๐ use solar::sema::hir::VariableId; ๐ use std::collections::HashSet; ๐
- DIVIDE_BEFORE_MULTIPLY
- check_block ๐
- Checks
block, returning false once control cannot continue past a statement. - check_branches ๐
- Checks the bodies of mutually exclusive branches and keeps the taint of every branch that
falls through, on top of the taint before the branch.
- check_expr ๐
- check_stmt ๐
- is_division_or_tainted ๐
- The value of
expr is a division result, directly or through a tainted local. - is_yul_call ๐
- A two-argument call to one of the given Yul builtins.
- rhs_taints ๐
- Taint of each of the
n slots assigned from rhs: elementwise for a tuple of matching arity,
otherwise the taint of the whole expression. - set_lhs_taint ๐
- set_taint ๐
- Tainted ๐
- Locals whose current value is the result of a division.