MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / flush_fn_ref_candidates

Method flush_fn_ref_candidates

codegraph-kernel/src/rustlang.rs:1305–1334  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1303 }
1304
1305 fn flush_fn_ref_candidates(&mut self) {
1306 let cands = std::mem::take(&mut self.fn_ref_cands);
1307 if cands.is_empty() || util::is_generated_file(self.file_path) {
1308 return;
1309 }
1310 let mut seen: HashSet<(String, String)> = HashSet::new();
1311 for c in cands {
1312 if !c.name.starts_with("this.")
1313 && !c.name.contains("::")
1314 && !self.defined_fn_names.contains(&c.name)
1315 && !self.imported_names.contains(&c.name)
1316 {
1317 continue;
1318 }
1319 if !seen.insert((self.node_ids[c.from as usize].clone(), c.name.clone())) {
1320 continue;
1321 }
1322 let column = util::col16(self.src, &self.line_starts, c.row, c.column_byte);
1323 let name_ref = self.arena.put(&c.name);
1324 self.tables.push_ref(&RefRow {
1325 from_idx: c.from,
1326 kind: FUNCTION_REF_CODE,
1327 line: c.line,
1328 column,
1329 reference_name: name_ref,
1330 candidates: NONE_STR,
1331 from_id_str: NONE_STR,
1332 });
1333 }
1334 }
1335
1336 // --- value refs -------------------------------------------------------------
1337

Callers 1

extractFunction · 0.45

Calls 4

is_generated_fileFunction · 0.85
col16Function · 0.85
putMethod · 0.65
push_refMethod · 0.45

Tested by

no test coverage detected