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

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


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: None (gbMattN)

<details>
<summary>Changes</summary>



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


1 Files Affected:

- (modified) llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index fcac686b4cd10..9bd257c6e2639 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -3447,7 +3447,7 @@ static StringRef getAllocaName(AllocaInst *AI) {
       if (!isa<MDTuple>(Annotation))
         continue;
       auto AnnotationTuple = cast<MDTuple>(Annotation);
-      for (int 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