(&self)
| 189 | } |
| 190 | |
| 191 | pub fn get_library_call_names(&self) -> Vec<String> { |
| 192 | let mut calls = Vec::new(); |
| 193 | let mut worklist = WorkList::new(); |
| 194 | worklist.push(&self.ast); |
| 195 | while !worklist.empty() { |
| 196 | let curr = worklist.pop(); |
| 197 | if let Clang::CallExpr(ce) = &curr.kind { |
| 198 | let name = ce.get_name_as_string(curr); |
| 199 | if get_func_gadget(&name).is_some() { |
| 200 | calls.push(name); |
| 201 | } |
| 202 | } |
| 203 | worklist.push_childs(curr.get_childs()); |
| 204 | } |
| 205 | calls |
| 206 | } |
| 207 | |
| 208 | /// find the call arg with the specificed name, and return its type name. |
| 209 | pub fn find_ty_with_arg_name(&self, arg_name: &str) -> Option<String> { |
no test coverage detected