[llvm] [llvm-objdump] Error with relevant message when adding invalid notes (PR #90458)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 04:38:10 PDT 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 15f02723d49be9a828fbf072966a225babd60457 2aaf91d8e329c5951f3ef8861c8f3322a37c5fe4 -- llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp b/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
index 90e59a5228..9630d8f9bb 100644
--- a/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
+++ b/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
@@ -626,12 +626,12 @@ handleUserSection(const NewSectionInfo &NewSection,
 static Error verifyNoteSection(StringRef Name, llvm::endianness E,
                                ArrayRef<uint8_t> Data) {
 
-// An ELF note have the following structure:
-// Name Size: 4 bytes (integer)
-// Desc Size: 4 bytes (integer)
-// Type     : 4 bytes
-// Name     : variable size, padded to a 4 byte boundary
-// Desc     : variable size, padded to a 4 byte boundary
+  // An ELF note have the following structure:
+  // Name Size: 4 bytes (integer)
+  // Desc Size: 4 bytes (integer)
+  // Type     : 4 bytes
+  // Name     : variable size, padded to a 4 byte boundary
+  // Desc     : variable size, padded to a 4 byte boundary
 
   if (Data.empty())
     return Error::success();

``````````

</details>


https://github.com/llvm/llvm-project/pull/90458


More information about the llvm-commits mailing list