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

Function is_null_ptr

src/program/infer/static_infer.rs:526–538  ·  view source on GitHub ↗
(arg: &Node, visitor: &Visitor)

Source from the content-addressed store, hash-verified

524 }
525
526 pub fn is_null_ptr(arg: &Node, visitor: &Visitor) -> bool {
527 let arg = strip_prefix(arg);
528 if let Clang::CXXNullPtrLiteralExpr(_) = &arg.kind {
529 return true;
530 } else if let Clang::GNUNullExpr(_) = &arg.kind {
531 return true;
532 } else if let Clang::DeclRefExpr(dre) = &arg.kind {
533 if let Some(init) = dre.get_var_init(visitor) {
534 return is_null_ptr(init, visitor);
535 }
536 }
537 false
538 }
539
540 /// Whehter this arg is a macro literal
541 pub fn is_macro_literal(arg: &Node, visitor: &Visitor) -> bool {

Callers 2

infer_constraintsFunction · 0.85

Calls 2

strip_prefixFunction · 0.85
get_var_initMethod · 0.80

Tested by

no test coverage detected