diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-02-17 19:22:05 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-02-17 19:22:05 +0000 |
commit | eca69623c2c942fdb995cecc92a275a189fd731c (patch) | |
tree | 15bfad3b8f3b48598b71cdd6a887942eff83d4d6 /include/clang/Analysis/PathSensitive/BasicValueFactory.h | |
parent | d563e52c37561e2657bf7af4e36f399310e405b1 (diff) |
BasicValueFactory: getMaxValue and getMinValue now also handle 'block' pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64786 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, 6 insertions, 4 deletions
diff --git a/include/clang/Analysis/PathSensitive/BasicValueFactory.h b/include/clang/Analysis/PathSensitive/BasicValueFactory.h index f25bf5da1d..a8d67b49a9 100644 --- a/include/clang/Analysis/PathSensitive/BasicValueFactory.h +++ b/include/clang/Analysis/PathSensitive/BasicValueFactory.h @@ -90,14 +90,16 @@ public: } 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)); } |