| 11 | : InputFilter(FilterName, std::move(NextFilter)), BaseDir(BaseDir) {} |
| 12 | |
| 13 | bool InvalidLocationFilter::check(const ASTIRNode &Node) const { |
| 14 | auto Loc = getLoc(Node.AST); |
| 15 | auto Path = std::get<0>(Loc); |
| 16 | auto Offset = std::get<1>(Loc); |
| 17 | auto Length = std::get<2>(Loc); |
| 18 | |
| 19 | if (Offset == 0 || Path.empty() || Length == 4294967295U) |
| 20 | return true; |
| 21 | |
| 22 | if (util::getRelativePath(Path, BaseDir).empty()) |
| 23 | return true; |
| 24 | |
| 25 | if (isHeaderFile(Path)) |
| 26 | return true; |
| 27 | |
| 28 | return false; |
| 29 | } |
| 30 | |
| 31 | std::tuple<std::string, unsigned, unsigned> |
| 32 | InvalidLocationFilter::getLoc(const ASTDefNode &ADN) const { |
nothing calls this directly
no test coverage detected