From 1d0a5f11c04e6ac4dab578b81d02eabb83b31428 Mon Sep 17 00:00:00 2001 From: Alexandre Ganea Date: Mon, 20 Feb 2023 17:16:21 -0500 Subject: [PATCH] [Support] Silence warning with Clang ToT. This fixes the following warning on Windows with latest Clang: ``` [160/3057] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.obj In file included from C:/git/llvm-project/llvm/lib/Support/Signals.cpp:260: C:/git/llvm-project/llvm/lib/Support/Windows/Signals.inc(834,15): warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] if (RetCode == (0xE0000000 | EX_IOERR)) ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~ 1 warning generated.``` --- llvm/lib/Support/Windows/Signals.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc index 4bf699f..cb82f55 100644 --- a/llvm/lib/Support/Windows/Signals.inc +++ b/llvm/lib/Support/Windows/Signals.inc @@ -830,7 +830,7 @@ void sys::CleanupOnSignal(uintptr_t Context) { // // 0xE0000000 is combined with the return code in the exception raised in // CrashRecoveryContext::HandleExit(). - int RetCode = (int)EP->ExceptionRecord->ExceptionCode; + unsigned RetCode = EP->ExceptionRecord->ExceptionCode; if (RetCode == (0xE0000000 | EX_IOERR)) return; LLVMUnhandledExceptionFilter(EP); -- 2.7.4