(&self, value: &Rc<SymbolicValue>)
| 157 | } |
| 158 | |
| 159 | fn infer_reference_nullness(&self, value: &Rc<SymbolicValue>) -> Option<PointerNullness> { |
| 160 | match &value.expression { |
| 161 | Expression::Reference(..) => Some(PointerNullness::NonNull), |
| 162 | Expression::Variable { path, var_type } |
| 163 | if *var_type == crate::analysis::memory::expression::ExpressionType::Reference => |
| 164 | { |
| 165 | self.nullness_domain.get(path) |
| 166 | } |
| 167 | Expression::Cast { |
| 168 | operand, |
| 169 | target_type, |
| 170 | } if *target_type == crate::analysis::memory::expression::ExpressionType::Reference => { |
| 171 | if operand.expression.is_zero() { |
| 172 | Some(PointerNullness::Null) |
| 173 | } else { |
| 174 | self.infer_reference_nullness(operand) |
| 175 | } |
| 176 | } |
| 177 | Expression::CompileTimeConstant(ConstantValue::Function(..)) => { |
| 178 | Some(PointerNullness::NonNull) |
| 179 | } |
| 180 | _ => None, |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | fn get_integer_operand_path(&mut self, value: &Rc<SymbolicValue>) -> Option<Rc<Path>> { |
| 185 | match &value.expression { |
no test coverage detected