From: Jordy Rose Date: Mon, 16 Aug 2010 23:25:19 +0000 (+0000) Subject: Allow the "size" of a buffer access check to be either signed or unsigned. Fixes... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=070f2f467cecacf5245deacd2c3a7c32402027c9;p=clang 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 0c0ccd6877..583462a00b 100644 --- a/lib/Checker/CStringChecker.cpp +++ b/lib/Checker/CStringChecker.cpp @@ -248,7 +248,7 @@ const GRState *CStringChecker::CheckBufferAccess(CheckerContext &C, 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.