[cfe-dev] Clang SourceLocation full file path
Himanshu via cfe-dev
cfe-dev at lists.llvm.org
Tue Oct 11 07:18:09 PDT 2016
Hi Manuel,
Yes I noticed the change recently. I can't pinpoint a date, but I believe
it was after the llvm update as I was using 3.8 release prior to that and
it returned the absolute paths.
Yes the returned paths are valid paths, but they seem to be relative to the
TU file under analysis.
--
Himanshu
On Tue, Oct 11, 2016 at 4:43 AM, Manuel Klimek <klimek at google.com> wrote:
> 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/e1c5eea5/attachment.html>
More information about the cfe-dev
mailing list