diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-02-17 22:21:44 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-02-17 22:21:44 +0000 |
commit | 63eb5878c3d97b002139b7da8ba449592bdef717 (patch) | |
tree | 5e0e495671c32f55417e2674551b45d225b5bbcf /include/clang/Analysis/PathSensitive/BasicValueFactory.h | |
parent | 327426076e1acc8217307cb236269ccf08c18fe6 (diff) |
BasicValueFactory: getMinValue/getMaxValue can be applied to any location type as specified by Loc::IsLocType().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/PathSensitive/BasicValueFactory.h')
-rw-r--r-- | include/clang/Analysis/PathSensitive/BasicValueFactory.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/clang/Analysis/PathSensitive/BasicValueFactory.h b/include/clang/Analysis/PathSensitive/BasicValueFactory.h index a8d67b49a9..64db2cd87b 100644 --- a/include/clang/Analysis/PathSensitive/BasicValueFactory.h +++ b/include/clang/Analysis/PathSensitive/BasicValueFactory.h @@ -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)); } |