[llvm] [DiagnosticInfo] Output full file path instead of relative path (PR #68027)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 13:14:10 PDT 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 451255b207c8630534b417c00de387ee98cf89e9 f2230c620ebf0bf160e44adb5237e1b498835a7a -- llvm/lib/IR/DiagnosticInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/IR/DiagnosticInfo.cpp b/llvm/lib/IR/DiagnosticInfo.cpp
index 242ca999979d..3c0f5d0f6d83 100644
--- a/llvm/lib/IR/DiagnosticInfo.cpp
+++ b/llvm/lib/IR/DiagnosticInfo.cpp
@@ -159,7 +159,10 @@ std::string DiagnosticInfoWithLocationBase::getLocationStr() const {
unsigned Column = 0;
if (isLocationAvailable())
getLocation(Filename, Line, Column);
- return (getAbsolutePath() ? getAbsolutePath() : Filename + ":" + Twine(Line) + ":" + Twine(Column)).str();
+ return (getAbsolutePath()
+ ? getAbsolutePath()
+ : Filename + ":" + Twine(Line) + ":" + Twine(Column))
+ .str();
}
DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key,
``````````
</details>
https://github.com/llvm/llvm-project/pull/68027
More information about the llvm-commits
mailing list