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

Function has_other_before_vd

src/ast/loc.rs:109–119  ·  view source on GitHub ↗

if there is other vd in this range.

(
    begin: &BareSourceLocation,
    end: &BareSourceLocation,
    src_file: &Path,
)

Source from the content-addressed store, hash-verified

107
108/// if there is other vd in this range.
109fn has_other_before_vd(
110 begin: &BareSourceLocation,
111 end: &BareSourceLocation,
112 src_file: &Path,
113) -> bool {
114 let begin_loc = begin.offset;
115 let end_loc = end.offset;
116 let buffer = std::fs::read_to_string(src_file).unwrap();
117 let buf = &buffer[begin_loc..end_loc];
118 buf.find('=').is_some()
119}
120
121fn has_other_after_vd(end: &BareSourceLocation, src_file: &Path) -> bool {
122 let buffer = std::fs::read_to_string(src_file).unwrap();

Callers 1

get_var_uninit_locFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected