(&self, visitor: &'a Visitor)
| 224 | } |
| 225 | |
| 226 | pub fn get_var_init<'a>(&self, visitor: &'a Visitor) -> Option<&'a Node> { |
| 227 | let var_name = self.get_name_as_string(); |
| 228 | if let Some(var) = visitor.find_vardecl(&var_name) { |
| 229 | if let Clang::VarDecl(vd) = &var.kind { |
| 230 | if !vd.has_init(var) { |
| 231 | return None; |
| 232 | } |
| 233 | let init = vd.get_init(var).ignore_parent().ignore_cast(); |
| 234 | return Some(init); |
| 235 | } |
| 236 | } |
| 237 | None |
| 238 | } |
| 239 | |
| 240 | // if this variable is initialized by a call, return this call. |
| 241 | pub fn get_var_init_call<'a>(&self, visitor: &'a Visitor) -> Option<&'a Node> { |
no test coverage detected