Skip to content

Commit 60692a6

Browse files
aganeatru
authored andcommitted
[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.``` (cherry picked from commit 1d0a5f1)
1 parent 54dee0b commit 60692a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/Windows/Signals.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ void sys::CleanupOnSignal(uintptr_t Context) {
830830
//
831831
// 0xE0000000 is combined with the return code in the exception raised in
832832
// CrashRecoveryContext::HandleExit().
833-
int RetCode = (int)EP->ExceptionRecord->ExceptionCode;
833+
unsigned RetCode = EP->ExceptionRecord->ExceptionCode;
834834
if (RetCode == (0xE0000000 | EX_IOERR))
835835
return;
836836
LLVMUnhandledExceptionFilter(EP);

0 commit comments

Comments
 (0)