diff --git a/lib/Support/FormattedStream.cpp b/lib/Support/FormattedStream.cpp index 081b8bf2cc1..5716afc187e 100644 --- a/lib/Support/FormattedStream.cpp +++ b/lib/Support/FormattedStream.cpp @@ -82,7 +82,7 @@ void formatted_raw_ostream::UpdatePosition(const char *Ptr, size_t Size) { // the display width until we see the rest of the code point. Stash the // bytes we do have, so that we can reconstruct the whole code point later, // even if the buffer is being flushed. - if ((End - Ptr) < NumBytes) { + if ((unsigned)(End - Ptr) < NumBytes) { PartialUTF8Char = StringRef(Ptr, End - Ptr); return; }