https://github.com/killcerr created 
https://github.com/llvm/llvm-project/pull/174587

```shell
input_line_0:10:30: warning: comparison of integers of different signs: 'int' 
and 'unsigned long' [-Wsign-compare]
```

>From 100e1e0519da2d0ef87e1d60413353e2ea23514f Mon Sep 17 00:00:00 2001
From: killcerr <[email protected]>
Date: Tue, 6 Jan 2026 21:27:13 +0800
Subject: [PATCH] [clang-repl] fix warning

input_line_0:10:30: warning: comparison of integers of different signs: 'int' 
and 'unsigned long' [-Wsign-compare]
---
 clang/lib/Interpreter/Interpreter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Interpreter/Interpreter.cpp 
b/clang/lib/Interpreter/Interpreter.cpp
index 1a6f6ea0813b7..299eb2ab3cc74 100644
--- a/clang/lib/Interpreter/Interpreter.cpp
+++ b/clang/lib/Interpreter/Interpreter.cpp
@@ -330,7 +330,7 @@ const char *const Runtimes = R"(
     void* operator new(__SIZE_TYPE__, void* __p, __clang_Interpreter_NewTag) 
noexcept;
     template <class T, class = T (*)() /*disable for arrays*/>
     void __clang_Interpreter_SetValueCopyArr(const T* Src, void* Placement, 
unsigned long Size) {
-      for (auto Idx = 0; Idx < Size; ++Idx)
+      for (auto Idx = 0ul; Idx < Size; ++Idx)
         new ((void*)(((T*)Placement) + Idx), __ci_newtag) T(Src[Idx]);
     }
     template <class T, unsigned long N>

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to