[llvm] Fix signed/unsigned mismatch warning (PR #134255)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 3 07:47:28 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 9bd257c6e..a4c6c61e5 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -3447,7 +3447,8 @@ static StringRef getAllocaName(AllocaInst *AI) {
       if (!isa<MDTuple>(Annotation))
         continue;
       auto AnnotationTuple = cast<MDTuple>(Annotation);
-      for (unsigned Index = 0; Index < AnnotationTuple->getNumOperands(); Index++) {
+      for (unsigned Index = 0; Index < AnnotationTuple->getNumOperands();
+           Index++) {
         // All annotations are strings
         auto MetadataString =
             cast<MDString>(AnnotationTuple->getOperand(Index));

``````````

</details>


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


More information about the llvm-commits mailing list