MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / get_library_call_names

Method get_library_call_names

src/ast/visitor.rs:191–206  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

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> {

Callers 1

compute_qualityMethod · 0.80

Calls 7

get_func_gadgetFunction · 0.85
emptyMethod · 0.80
popMethod · 0.80
get_name_as_stringMethod · 0.80
push_childsMethod · 0.80
pushMethod · 0.45
get_childsMethod · 0.45

Tested by

no test coverage detected