Fix -Wsign-compare warning reported by clang++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98170 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index 0c22de7..156b809 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -43,7 +43,8 @@
/// scratch buffer. If the ContentCache encapsulates a source file, that
/// file is not lazily brought in from disk to satisfy this query.
unsigned ContentCache::getSize() const {
- return Buffer ? Buffer->getBufferSize() : Entry->getSize();
+ return Buffer ? (unsigned) Buffer->getBufferSize()
+ : (unsigned) Entry->getSize();
}
void ContentCache::replaceBuffer(const llvm::MemoryBuffer *B) {