aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BasicValueFactory.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-11 02:52:39 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-11 02:52:39 +0000
commitfa6228d61499e4f6c490afeb636e36d8ae00b5ee (patch)
tree8a314470380393ed5fd29711842c3e0aff108940 /lib/Analysis/BasicValueFactory.cpp
parent0bed8a12f2878d3cd94fb8bdba55b593d92dd11a (diff)
Fix PR 3780: In one code path in BasicValueFactory::getValue() we would not
return an unsigned integer for a null pointer value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicValueFactory.cpp')
-rw-r--r--lib/Analysis/BasicValueFactory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/BasicValueFactory.cpp b/lib/Analysis/BasicValueFactory.cpp
index 2c7d6a37c1..6ceab93b08 100644
--- a/lib/Analysis/BasicValueFactory.cpp
+++ b/lib/Analysis/BasicValueFactory.cpp
@@ -92,7 +92,7 @@ const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, unsigned BitWidth,
const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, QualType T) {
unsigned bits = Ctx.getTypeSize(T);
- llvm::APSInt V(bits, T->isUnsignedIntegerType());
+ llvm::APSInt V(bits, T->isUnsignedIntegerType() || Loc::IsLocType(T));
V = X;
return getValue(V);
}