Fix PR 3780: In one code path in BasicValueFactory::getValue() we would not
return an unsigned integer for a null pointer value.
llvm-svn: 66630
diff --git a/clang/lib/Analysis/BasicValueFactory.cpp b/clang/lib/Analysis/BasicValueFactory.cpp
index 2c7d6a3..6ceab93 100644
--- a/clang/lib/Analysis/BasicValueFactory.cpp
+++ b/clang/lib/Analysis/BasicValueFactory.cpp
@@ -92,7 +92,7 @@
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);
}