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

Method analyzeTargetCallArg

lib/inputanalysis/DefAnalyzer.cpp:173–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173DefAnalyzer::ArgDef DefAnalyzer::analyzeTargetCallArg(llvm::CallBase &CB,
174 unsigned ArgIdx) {
175 auto FoundRootDefs =
176 Analyzer->getRootDefinitions(CB.getArgOperandUse(ArgIdx));
177 std::vector<RDNode> RootDefs(FoundRootDefs.begin(), FoundRootDefs.end());
178 RootDefs.erase(std::remove_if(RootDefs.begin(), RootDefs.end(),
179 [this](const auto &Node) {
180 return this->isInvalidRDNode(*ASTMap, Node);
181 }),
182 RootDefs.end());
183
184 std::set<RDNode> Nodes(RootDefs.begin(), RootDefs.end());
185 DefAnalyzer::ArgDef Result = {.Defs = Nodes};
186 return Result;
187}
188
189std::set<RDNode> DefAnalyzer::collectRDNodes(
190 const std::map<Unittest *, std::vector<FuncDef>> &UTDefMap) const {

Callers

nothing calls this directly

Calls 4

isInvalidRDNodeMethod · 0.95
getRootDefinitionsMethod · 0.80
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected