Skip to content

Commit

Permalink
[clangd] Silence warning when compiling with MSVC targetting x86
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
aganea committed Jan 25, 2024
1 parent 419d6ea commit f33f5a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang-tools-extra/clangd/InlayHints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit f33f5a0

Please sign in to comment.