[llvm] Fix signed/unsigned mismatch warning (PR #134255)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 3 07:48:20 PDT 2025
https://github.com/gbMattN updated https://github.com/llvm/llvm-project/pull/134255
>From a8be96b72aaf361e1d2ac9fff0a008f510d01696 Mon Sep 17 00:00:00 2001
From: gbMattN <matthew.nagy at sony.com>
Date: Thu, 3 Apr 2025 15:44:07 +0100
Subject: [PATCH] Fix signed/unsigned mismatch warning
---
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index fcac686b4cd10..a4c6c61e57998 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 (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));
More information about the llvm-commits
mailing list