[cfe-commits] r98170 - /cfe/trunk/lib/Basic/SourceManager.cpp

Ted Kremenek kremenek at apple.com
Wed Mar 10 10:22:38 PST 2010


Author: kremenek
Date: Wed Mar 10 12:22:38 2010
New Revision: 98170

URL: http://llvm.org/viewvc/llvm-project?rev=98170&view=rev
Log:
Fix -Wsign-compare warning reported by clang++.

Modified:
    cfe/trunk/lib/Basic/SourceManager.cpp

Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=98170&r1=98169&r2=98170&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Wed Mar 10 12:22:38 2010
@@ -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) {





More information about the cfe-commits mailing list