[clang-tools-extra] f33f5a0 - [clangd] Silence warning when compiling with MSVC targetting x86
Alexandre Ganea via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 25 06:34:31 PST 2024
Author: Alexandre Ganea
Date: 2024-01-25T09:34:17-05:00
New Revision: f33f5a04e9feeb9b473694825d84da8322f87df9
URL: https://github.com/llvm/llvm-project/commit/f33f5a04e9feeb9b473694825d84da8322f87df9
DIFF: https://github.com/llvm/llvm-project/commit/f33f5a04e9feeb9b473694825d84da8322f87df9.diff
LOG: [clangd] Silence warning when compiling with MSVC targetting x86
This fixes:
```
[5240/6995] Building CXX object tools\clang\tools\extra\clangd\CMakeFiles\obj.clangDaemon.dir\InlayHints.cpp.obj
C:\git\llvm-project\clang-tools-extra\clangd\InlayHints.cpp(1098): warning C4018: '<': signed/unsigned mismatch
```
Added:
Modified:
clang-tools-extra/clangd/InlayHints.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/InlayHints.cpp b/clang-tools-extra/clangd/InlayHints.cpp
index 5722ca8f66eb720..c7dce041474a1c8 100644
--- a/clang-tools-extra/clangd/InlayHints.cpp
+++ b/clang-tools-extra/clangd/InlayHints.cpp
@@ -1095,7 +1095,7 @@ class InlayHintVisitor : public RecursiveASTVisitor<InlayHintVisitor> {
if (auto *Def = Callee->getDefinition()) {
auto I = std::distance(Callee->param_begin(),
llvm::find(Callee->parameters(), P));
- if (I < Callee->getNumParams()) {
+ if (I < (int)Callee->getNumParams()) {
return Def->getParamDecl(I);
}
}
More information about the cfe-commits
mailing list