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

Function get_post_vd_begin

src/ast/loc.rs:82–91  ·  view source on GitHub ↗
(vd_begin: &BareSourceLocation, src_file: &Path)

Source from the content-addressed store, hash-verified

80}
81
82fn get_post_vd_begin(vd_begin: &BareSourceLocation, src_file: &Path) -> Result<usize> {
83 let begin_loc = vd_begin.offset;
84 let buffer = std::fs::read_to_string(src_file)?;
85 let last_char = buffer.chars().nth(begin_loc - 1).unwrap();
86 if last_char == '*' {
87 Ok(begin_loc - 1)
88 } else {
89 Ok(begin_loc)
90 }
91}
92
93fn get_vd_end_offset(vd_end: &BareSourceLocation, src_file: &Path) -> Result<usize> {
94 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