diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index fcac686b4cd1..a4c6c61e5799 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(Annotation)) continue; auto AnnotationTuple = cast(Annotation); - for (int Index = 0; Index < AnnotationTuple->getNumOperands(); Index++) { + for (unsigned Index = 0; Index < AnnotationTuple->getNumOperands(); + Index++) { // All annotations are strings auto MetadataString = cast(AnnotationTuple->getOperand(Index));