[cfe-commits] r64786 - /cfe/trunk/include/clang/Analysis/PathSensitive/BasicValueFactory.h

Ted Kremenek kremenek at apple.com
Tue Feb 17 11:22:06 PST 2009


Author: kremenek
Date: Tue Feb 17 13:22:05 2009
New Revision: 64786

URL: http://llvm.org/viewvc/llvm-project?rev=64786&view=rev
Log:
BasicValueFactory: getMaxValue and getMinValue now also handle 'block' pointers.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/BasicValueFactory.h

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/BasicValueFactory.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/BasicValueFactory.h?rev=64786&r1=64785&r2=64786&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/BasicValueFactory.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/BasicValueFactory.h Tue Feb 17 13:22:05 2009
@@ -90,14 +90,16 @@
   }
 
   inline const llvm::APSInt& getMaxValue(QualType T) {
-    assert(T->isIntegerType() || T->isPointerType());
-    bool isUnsigned = T->isUnsignedIntegerType() || T->isPointerType();
+    assert(T->isIntegerType() || T->isPointerType() || T->isBlockPointerType());
+    bool isUnsigned = T->isUnsignedIntegerType() || T->isPointerType() ||
+                      T->isBlockPointerType();
     return getValue(llvm::APSInt::getMaxValue(Ctx.getTypeSize(T), isUnsigned));
   }
   
   inline const llvm::APSInt& getMinValue(QualType T) {
-    assert(T->isIntegerType() || T->isPointerType());
-    bool isUnsigned = T->isUnsignedIntegerType() || T->isPointerType();
+    assert(T->isIntegerType() || T->isPointerType() || T->isBlockPointerType());
+    bool isUnsigned = T->isUnsignedIntegerType() || T->isPointerType() ||
+                      T->isBlockPointerType();
     return getValue(llvm::APSInt::getMinValue(Ctx.getTypeSize(T), isUnsigned));
   }
   





More information about the cfe-commits mailing list