From: Ted Kremenek Date: Wed, 10 Mar 2010 18:22:38 +0000 (+0000) Subject: Fix -Wsign-compare warning reported by clang++. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8515fbf1a1b89e9750ebf3e2ee2c9440424befee;p=clang 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 0c22de7bdd..156b809b51 100644 --- a/lib/Basic/SourceManager.cpp +++ b/lib/Basic/SourceManager.cpp @@ -43,7 +43,8 @@ unsigned ContentCache::getSizeBytesMapped() const { /// 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) {