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

Method isMacroFunctionAssigned

lib/inputfilter/CompileConstantFilter.cpp:18–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18bool CompileConstantFilter::isMacroFunctionAssigned(
19 const ASTDefNode &Node) const {
20 const auto *Assigned = Node.getAssigned();
21 if (!Assigned)
22 return false;
23
24 const auto *S = Assigned->getNode().get<Stmt>();
25 if (!S)
26 return false;
27
28 const auto &SrcManager =
29 const_cast<ASTNode *>(Assigned)->getASTUnit().getSourceManager();
30 auto Loc = SrcManager.getTopMacroCallerLoc(S->getBeginLoc());
31 return util::getMacroFunctionExpansionRange(SrcManager, Loc).isValid();
32}
33
34bool CompileConstantFilter::isOffsetOfExpr(const ASTDefNode &Node) const {
35 const auto *Assigned = Node.getAssigned();

Callers

nothing calls this directly

Calls 4

getAssignedMethod · 0.80
getBeginLocMethod · 0.80
isValidMethod · 0.80

Tested by

no test coverage detected