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

Function is_macro_stmt

src/ast/loc.rs:278–286  ·  view source on GitHub ↗

Whether this range is in some header files.

(range: &SourceRange)

Source from the content-addressed store, hash-verified

276
277/// Whether this range is in some header files.
278pub fn is_macro_stmt(range: &SourceRange) -> bool {
279 if let Some(loc) = &range.begin.spelling_loc {
280 return loc.file.as_ref().ends_with(".h");
281 }
282 if let Some(loc) = &range.end.spelling_loc {
283 return loc.file.as_ref().ends_with(".h");
284 }
285 false
286}
287
288pub fn is_macro_expansion(range: &SourceRange) -> bool {
289 range.begin.expansion_loc.is_some() || range.end.expansion_loc.is_some()

Callers 3

change_call_argMethod · 0.85
is_macro_literalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected