]> granicus.if.org Git - clang/commitdiff
Fix -Wsign-compare warning reported by clang++.
authorTed Kremenek <kremenek@apple.com>
Wed, 10 Mar 2010 18:22:38 +0000 (18:22 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 10 Mar 2010 18:22:38 +0000 (18:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98170 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/SourceManager.cpp

index 0c22de7bddb1a8bab3bc578cc841ea61ad150156..156b809b51f2b6e1ef8839ac50620ff82ab03b95 100644 (file)
@@ -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) {