From: Alexandre Ganea Date: Mon, 20 Feb 2023 22:16:21 +0000 (-0500) Subject: [Support] Silence warning with Clang ToT. X-Git-Tag: upstream/17.0.6~16942 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d0a5f11c04e6ac4dab578b81d02eabb83b31428;p=platform%2Fupstream%2Fllvm.git [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.``` --- 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);