[clang] 419d6ea - [clang] Silence warning when compiling with MSVC targetting x86
Alexandre Ganea via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 25 06:34:30 PST 2024
Author: Alexandre Ganea
Date: 2024-01-25T09:34:17-05:00
New Revision: 419d6ea135dd205e1eaab368a58ae14f9f52f699
URL: https://github.com/llvm/llvm-project/commit/419d6ea135dd205e1eaab368a58ae14f9f52f699
DIFF: https://github.com/llvm/llvm-project/commit/419d6ea135dd205e1eaab368a58ae14f9f52f699.diff
LOG: [clang] Silence warning when compiling with MSVC targetting x86
This fixes:
```
[3963/6996] Building CXX object tools\clang\lib\CodeGen\CMakeFiles\obj.clangCodeGen.dir\CGExpr.cpp.obj
C:\git\llvm-project\clang\lib\CodeGen\CGExpr.cpp(3808): warning C4018: '<=': signed/unsigned mismatch
```
Added:
Modified:
clang/lib/CodeGen/CGExpr.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index c5f6b6d3a99f0b2..9196c953145b214 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -3805,7 +3805,7 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
// If we're optimizing, collapse all calls to trap down to just one per
// check-type per function to save on code size.
- if (TrapBBs.size() <= CheckHandlerID)
+ if ((int)TrapBBs.size() <= CheckHandlerID)
TrapBBs.resize(CheckHandlerID + 1);
llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID];
More information about the cfe-commits
mailing list