Allow the "size" of a buffer access check to be either signed or unsigned. Fixes PR7925.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111205 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Checker/CStringChecker.cpp b/lib/Checker/CStringChecker.cpp
index 0c0ccd6..583462a 100644
--- a/lib/Checker/CStringChecker.cpp
+++ b/lib/Checker/CStringChecker.cpp
@@ -248,7 +248,7 @@
SValuator &SV = VM.getSValuator();
ASTContext &Ctx = C.getASTContext();
- QualType SizeTy = Ctx.getSizeType();
+ QualType SizeTy = Size->getType();
QualType PtrTy = Ctx.getPointerType(Ctx.CharTy);
// Check that the first buffer is non-null.