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

Method getBeginLoc

lib/astirmap/ASTNode.cpp:65–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65SourceLocation
66ASTNode::getBeginLoc(const DynTypedNode &Node,
67 const clang::SourceManager &SrcManager) const {
68 SourceLocation Result;
69 if (const auto *AST = Node.get<Decl>())
70 Result = AST->getLocation();
71 else if (const auto *AST = Node.get<CXXCtorInitializer>())
72 Result = AST->getSourceRange().getBegin();
73 else if (const auto *AST = Node.get<CXXOperatorCallExpr>())
74 Result = AST->getOperatorLoc();
75 else if (const auto *AST = Node.get<CXXMemberCallExpr>())
76 Result = AST->getExprLoc();
77 else if (const auto *AST = Node.get<Stmt>())
78 Result = AST->getBeginLoc();
79 else
80 assert(false && "Unimplemented");
81 return SrcManager.getTopMacroCallerLoc(Result);
82}
83
84SourceLocation ASTNode::getEndLoc(const DynTypedNode &Node,
85 const SourceLocation &BeginLoc,

Callers 10

getDebugLocFunction · 0.80
getTopMacroCallerLocFunction · 0.80
ASTDefNodeMethod · 0.80
isUndefinedTypeMethod · 0.80
getGlobalEndOffsetMethod · 0.80
getDeclTypeInfoMethod · 0.80
TEST_FFunction · 0.80

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.64