<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Clang Experts, could you kindly advice how to get location of a function *name* when visiting FunctionDecl in RecursiveASTVisitor (getBeginLoc and getEndLoc return the whole range for the definition, not just the name). Example:</div><div dir="ltr"><br></div><div dir="ltr">For source code like this:<div>int f(int x) { return x + 1; }<br></div><div><br></div><div>this is the current code</div><div><br></div><div>bool VisitFunctionDecl(clang::FunctionDecl *FD) {<br></div><div><div>    clang::ASTContext &context = FD->getASTContext();<br></div><div>    int begin = context.getFullLoc(FD->getBeginLoc()).getFileOffset();</div><div>    int end = context.getFullLoc(FD->getEndLoc()).getFileOffset();</div><div>    std::string path = context.getFullLoc(FD->getBeginLoc()).getFileEntry()->getName().str();</div><div>.   ..</div></div><div>}</div><div><br></div><div>will give offsets [0,29], but I'd like to get the location of the "f", i.e. [5-6].</div><div><br></div><div>Thanks!</div><div>Sterling.</div></div></div></div>