MCPcopy Create free account
hub / github.com/Samsung/UTopia / check

Method check

lib/inputfilter/InvalidLocationFilter.cpp:13–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11 : InputFilter(FilterName, std::move(NextFilter)), BaseDir(BaseDir) {}
12
13bool 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
31std::tuple<std::string, unsigned, unsigned>
32InvalidLocationFilter::getLoc(const ASTDefNode &ADN) const {

Callers

nothing calls this directly

Calls 3

getRelativePathFunction · 0.85
isHeaderFileFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected