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

Method isArgsInMacro

lib/astirmap/DebugInfoMap.cpp:254–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254bool DebugInfoMap::isArgsInMacro(const ASTDefNode &Node, Expr &E,
255 unsigned ArgNo, ASTUnit &U) const {
256 const auto *CurAssigned = Node.getAssigned();
257 assert(CurAssigned && "Unexpected Program State");
258
259 const auto &CurLoc = CurAssigned->getIndex();
260 if (ArgNo > 0 && !util::isDefaultArgument(E, ArgNo - 1) &&
261 !util::isImplicitArgument(E, ArgNo - 1)) {
262 auto Prev = getArgumentNode(E, ArgNo - 1, U);
263 if (Prev && Prev->getAssigned() &&
264 Prev->getAssigned()->getIndex() == CurLoc)
265 return true;
266 }
267
268 auto ArgSize = util::getArgExprs(E).size();
269 if (ArgSize > ArgNo + 1 && !util::isDefaultArgument(E, ArgNo + 1) &&
270 !util::isImplicitArgument(E, ArgNo + 1)) {
271 auto Next = getArgumentNode(E, ArgNo + 1, U);
272 if (Next && Next->getAssigned() &&
273 Next->getAssigned()->getIndex() == CurLoc)
274 return true;
275 }
276 return false;
277}
278
279bool DebugInfoMap::isNullType(const ASTDefNode &Node) const {
280 QualType T;

Callers

nothing calls this directly

Calls 5

isDefaultArgumentFunction · 0.85
isImplicitArgumentFunction · 0.85
getArgExprsFunction · 0.85
getAssignedMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected