diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -2186,9 +2186,9 @@ unsigned NumArgs = Record.readInt(); E->BeginLoc = readSourceLocation(); E->EndLoc = readSourceLocation(); - assert( - (NumArgs == std::distance(E->children().begin(), E->children().end())) && - "Wrong NumArgs!"); + assert((NumArgs + 0LL == + std::distance(E->children().begin(), E->children().end())) && + "Wrong NumArgs!"); (void)NumArgs; for (Stmt *&Child : E->children()) Child = Record.readSubStmt(); diff --git a/llvm/lib/CodeGen/StackMaps.cpp b/llvm/lib/CodeGen/StackMaps.cpp --- a/llvm/lib/CodeGen/StackMaps.cpp +++ b/llvm/lib/CodeGen/StackMaps.cpp @@ -401,7 +401,7 @@ SmallVector GCPtrIndices; unsigned GCPtrIdx = (unsigned)SO.getFirstGCPtrIdx(); assert((int)GCPtrIdx != -1); - assert(MOI - MI.operands_begin() == GCPtrIdx); + assert(MOI - MI.operands_begin() == GCPtrIdx + 0LL); while (NumGCPointers--) { GCPtrIndices.push_back(GCPtrIdx); GCPtrIdx = StackMaps::getNextMetaArgIdx(&MI, GCPtrIdx);