[llvm] 1d0a5f1 - [Support] Silence warning with Clang ToT.
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 15:25:28 PST 2023
Author: Alexandre Ganea
Date: 2023-02-20T18:25:20-05:00
New Revision: 1d0a5f11c04e6ac4dab578b81d02eabb83b31428
URL: https://github.com/llvm/llvm-project/commit/1d0a5f11c04e6ac4dab578b81d02eabb83b31428
DIFF: https://github.com/llvm/llvm-project/commit/1d0a5f11c04e6ac4dab578b81d02eabb83b31428.diff
LOG: [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.```
Added:
Modified:
llvm/lib/Support/Windows/Signals.inc
Removed:
################################################################################
diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc
index 4bf699f2bccf0..cb82f55fc38be 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);
More information about the llvm-commits
mailing list