diff --git a/tools/llvm-cfi-verify/llvm-cfi-verify.cpp b/tools/llvm-cfi-verify/llvm-cfi-verify.cpp index b221e5a8332..2fde74bd24c 100644 --- a/tools/llvm-cfi-verify/llvm-cfi-verify.cpp +++ b/tools/llvm-cfi-verify/llvm-cfi-verify.cpp @@ -71,9 +71,9 @@ void printBlameContext(const DILineInfo &LineInfo, unsigned Context) { SmallVector Lines; File->getBuffer().split(Lines, '\n'); - for (unsigned i = std::max(1l, (long)LineInfo.Line - Context); + for (unsigned i = std::max(1, LineInfo.Line - Context); i < - std::min(Lines.size() + 1, (unsigned long)LineInfo.Line + Context + 1); + std::min(Lines.size() + 1, LineInfo.Line + Context + 1); ++i) { if (i == LineInfo.Line) outs() << ">";