]> granicus.if.org Git - clang/commitdiff
BasicValueFactory: getMinValue/getMaxValue can be applied to any location type as...
authorTed Kremenek <kremenek@apple.com>
Tue, 17 Feb 2009 22:21:44 +0000 (22:21 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 17 Feb 2009 22:21:44 +0000 (22:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64832 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/BasicValueFactory.h

index a8d67b49a9d0d4de5cd9d442c0514f4009c97b65..64db2cd87bbb3c0e3873a645fc941a72ef33b269 100644 (file)
@@ -90,16 +90,14 @@ public:
   }
 
   inline const llvm::APSInt& getMaxValue(QualType T) {
-    assert(T->isIntegerType() || T->isPointerType() || T->isBlockPointerType());
-    bool isUnsigned = T->isUnsignedIntegerType() || T->isPointerType() ||
-                      T->isBlockPointerType();
+    assert(T->isIntegerType() || Loc::IsLocType(T));
+    bool isUnsigned = T->isUnsignedIntegerType() || Loc::IsLocType(T);
     return getValue(llvm::APSInt::getMaxValue(Ctx.getTypeSize(T), isUnsigned));
   }
   
   inline const llvm::APSInt& getMinValue(QualType T) {
-    assert(T->isIntegerType() || T->isPointerType() || T->isBlockPointerType());
-    bool isUnsigned = T->isUnsignedIntegerType() || T->isPointerType() ||
-                      T->isBlockPointerType();
+    assert(T->isIntegerType() || Loc::IsLocType(T));
+    bool isUnsigned = T->isUnsignedIntegerType() || Loc::IsLocType(T);
     return getValue(llvm::APSInt::getMinValue(Ctx.getTypeSize(T), isUnsigned));
   }