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

Function get_sr_begin_loc

src/ast/loc.rs:16–28  ·  view source on GitHub ↗

Get the bigin location of this range.

(sr: &SourceRange)

Source from the content-addressed store, hash-verified

14
15/// Get the bigin location of this range.
16pub fn get_sr_begin_loc(sr: &SourceRange) -> Result<&BareSourceLocation> {
17 if let Some(begin) = &sr.begin.spelling_loc {
18 if begin.file.ends_with(".cc") {
19 return Ok(begin);
20 }
21 }
22 if let Some(begin) = &sr.begin.expansion_loc {
23 if begin.file.ends_with(".cc") {
24 return Ok(begin);
25 }
26 }
27 eyre::bail!("cannot get begin from SourceRange: {sr:?}")
28}
29
30/// Get the end location of this range.
31pub fn get_sr_end_loc(sr: &SourceRange) -> Result<&BareSourceLocation> {

Callers 12

handle_set_jumpMethod · 0.85
get_sr_offsetFunction · 0.85
get_loc_before_stmtFunction · 0.85
get_var_uninit_locFunction · 0.85
get_source_code_rangeFunction · 0.85
get_fd_locMethod · 0.85
get_fd_param_locMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected