Silences a sign compare warning on 32 bit archs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180110
91177308-0d34-0410-b5e6-
96231b3b80d8
unsigned ColNo = SM.getColumnNumber(FID, FileOffset);
// Arbitrarily stop showing snippets when the line is too long.
- static const ptrdiff_t MaxLineLengthToPrint = 4096;
+ static const size_t MaxLineLengthToPrint = 4096;
if (ColNo > MaxLineLengthToPrint)
return;
++LineEnd;
// Arbitrarily stop showing snippets when the line is too long.
- if (LineEnd - LineStart > MaxLineLengthToPrint)
+ if (size_t(LineEnd - LineStart) > MaxLineLengthToPrint)
return;
// Copy the line of code into an std::string for ease of manipulation.