Whether this range is in some header files.
(range: &SourceRange)
| 276 | |
| 277 | /// Whether this range is in some header files. |
| 278 | pub 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 | |
| 288 | pub fn is_macro_expansion(range: &SourceRange) -> bool { |
| 289 | range.begin.expansion_loc.is_some() || range.end.expansion_loc.is_some() |
no outgoing calls
no test coverage detected