(&mut self, stmt: &ast::Node)
| 201 | } |
| 202 | |
| 203 | fn visit_binary_operator(&mut self, stmt: &ast::Node) -> Result<()> { |
| 204 | if let ast::Clang::BinaryOperator(bo) = &stmt.kind { |
| 205 | let left = bo.get_lhs(stmt); |
| 206 | let right = bo.get_rhs(stmt); |
| 207 | if bo.is_assignment() { |
| 208 | let var = left.get_var_name(); |
| 209 | let sym = self.get_rvalue(right)?; |
| 210 | self.store_mgr.ssa_bind_value(var, sym)?; |
| 211 | } else { |
| 212 | self.visit_stmt(left)?; |
| 213 | self.visit_stmt(right)?; |
| 214 | } |
| 215 | // do not evalute other kinds of binary operator. |
| 216 | return Ok(()); |
| 217 | } |
| 218 | eyre::bail!("Visit BinaryOperator, but visited {stmt:?}") |
| 219 | } |
| 220 | |
| 221 | fn visit_call_expr(&mut self, stmt: &ast::Node) -> Result<()> { |
| 222 | // TODO: here to add callback |
no test coverage detected