[cfe-dev] Clang SourceLocation full file path

Manuel Klimek via cfe-dev cfe-dev at lists.llvm.org
Tue Oct 11 02:43:51 PDT 2016


On Sat, Oct 8, 2016 at 3:35 PM Himanshu via cfe-dev <cfe-dev at lists.llvm.org>
wrote:

> Hi All,
>
> I have been using SourceLocation::printToString(SourceManager) to get the
> string containing the full-path of a source location in Clang.
>
> However, the API is suddenly
>

What do you mean by suddenly? Did you see a change in behavior recently?


> behaving inconsistently: when ran with some files it prints their absolute
> path:line:col, for others it only prints the filename (basename):line:col.
>
> Could someone please let me know how to make sure that I always get the
> absolute path?
>

Are those paths valid relative paths at your current working directory?


>
> Thanks,
> --
> Himanshu
>
>
> _______________________________________________
>
> cfe-dev mailing list
>
> cfe-dev at lists.llvm.org
>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20161011/0ad80bcc/attachment.html>


More information about the cfe-dev mailing list