[cfe-dev] getLocStart versus getStartLoc

Stephen Kelly via cfe-dev cfe-dev at lists.llvm.org
Mon Jul 9 14:05:45 PDT 2018


Stephen Kelly via cfe-dev wrote:

> 1) DeclarationNameInfo has both getLocEnd and getEndLoc. Both are used by
> calling code, and I can't tell if any use is incorrect. At any rate, if
> the two methods are to remain, the getLocEnd() one should be renamed to
> something more specific as it is the one doing something different to
> other getLocEnd/getEndLoc methods which generally don't 'try again' in the
> invalid case.

I created a patch to inline getLocEnd() into callers.

 https://reviews.llvm.org/D49100


> <snip>
> Is that something we would really want to do? I value consistency, but
> breaking all Clang API users so dramatically is something to do only if it
> is seen as valuable to a consensus of the community.

This is still pending discussion of some sort.

Thanks,

Stephen.




More information about the cfe-dev mailing list