[llvm] [DiagnosticInfo] Output full file path instead of relative path (PR #68027)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 00:52:23 PDT 2023
================
@@ -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:
Couldn't you do this at the point you display the diagnostic?
https://github.com/llvm/llvm-project/pull/68027
More information about the llvm-commits
mailing list