Skip to content

Commit

Permalink
fix: ASTVisitor.cpp indexes are unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed Jul 30, 2024
1 parent 53b46cb commit f8cc81e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/AST/ASTVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ class ASTVisitor
ArrayRef<TemplateArgument> Arguments,
unsigned Index)
{
if(Index == -1)
if(Index == static_cast<unsigned>(-1))
return std::nullopt;
if(Index < Arguments.size())
return Arguments[Index];
Expand Down Expand Up @@ -1647,7 +1647,7 @@ class ASTVisitor
if(CurrentType->isDependentType())
{
auto FoundIdx = FindParam(Args, TemplateArgument(CurrentType));
if(FoundIdx == -1 || FoundIdx >= PrimaryArgs.size())
if(FoundIdx == static_cast<decltype(FoundIdx)>(-1) || FoundIdx >= PrimaryArgs.size())
return true;
ParamIdx = FoundIdx;
TemplateArgument MappedPrimary = PrimaryArgs[FoundIdx];
Expand Down

0 comments on commit f8cc81e

Please sign in to comment.