[llvm] Fix crash due to un-checked error in LVReaderHandler::handleArchive method (PR #118951)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 16:16:59 PST 2024
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 e9866d5d149706eac26f45bf0cab933c51d6d1cd 336844c32c43938866c3f315af745eddb1691292 --extensions cpp -- llvm/lib/DebugInfo/LogicalView/LVReaderHandler.cpp llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/DebugInfo/LogicalView/LVReaderHandler.cpp b/llvm/lib/DebugInfo/LogicalView/LVReaderHandler.cpp
index 7d64100c60..69513f2b98 100644
--- a/llvm/lib/DebugInfo/LogicalView/LVReaderHandler.cpp
+++ b/llvm/lib/DebugInfo/LogicalView/LVReaderHandler.cpp
@@ -90,7 +90,7 @@ Error LVReaderHandler::handleArchive(LVReaders &Readers, StringRef Filename,
if (Err)
return createStringError(errorToErrorCode(std::move(Err)), "%s",
- Filename.str().c_str());
+ Filename.str().c_str());
return Error::success();
}
diff --git a/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp b/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp
index c05114541d..7639f001e3 100644
--- a/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp
+++ b/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp
@@ -32,7 +32,8 @@ namespace {
const char *CodeViewClang = "test-codeview-clang.o";
const char *CodeViewMsvc = "test-codeview-msvc.o";
const char *CodeViewMsvcLib = "test-codeview-msvc.lib";
-const char *CodeViewMsvcLibContentName = "test-codeview-msvc.lib(test-codeview-msvc.o)";
+const char *CodeViewMsvcLibContentName =
+ "test-codeview-msvc.lib(test-codeview-msvc.o)";
const char *CodeViewPdbMsvc = "test-codeview-pdb-msvc.o";
// Helper function to get the first scope child from the given parent.
``````````
</details>
https://github.com/llvm/llvm-project/pull/118951
More information about the llvm-commits
mailing list