[cfe-dev] getLocStart versus getStartLoc

Richard Smith via cfe-dev cfe-dev at lists.llvm.org
Tue Jun 26 19:02:46 PDT 2018


On 26 June 2018 at 15:54, Stephen Kelly via cfe-dev <cfe-dev at lists.llvm.org>
wrote:

> Hello,
>
> Some AST classes have non-pure methods called getStartLoc, which return
> the
> same thing as getLocStart (DeclStmt and CXXNewExpr).
>
> This is confusing to a newcomer to the clang AST trying to write an AST
> matcher for example.
>
> Is there some reason for that?
>
> If not, is there any objection to me
>
> * Removing and porting away from getStartLoc() methods
> * Renaming DeclStmt::setStartLoc to getStartLoc


There is no reason for this other than a change in preference at some point
in the distant past that we never cleaned up after. Please feel free to do
the cleanup you're suggesting!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180626/1f0ff725/attachment.html>


More information about the cfe-dev mailing list