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 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?
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.