[llvm] [DiagnosticInfo] Output full file path instead of relative path (PR #68027)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 29 05:18:16 PST 2024
================
@@ -157,8 +157,10 @@ std::string DiagnosticInfoWithLocationBase::getLocationStr() const {
StringRef Filename("<unknown>");
unsigned Line = 0;
unsigned Column = 0;
- if (isLocationAvailable())
+ if (isLocationAvailable()) {
getLocation(Filename, Line, Column);
+ return (getAbsolutePath() + ":" + Twine(Line) + ":" + Twine(Column)).str();
----------------
arsenm wrote:
This is calling getLocation, then discarding the filename? Shouldn't this also be up to the client's decision on how to display the path?
https://github.com/llvm/llvm-project/pull/68027
More information about the llvm-commits
mailing list