summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/CStringChecker.cpp
Commit message (Collapse)AuthorAgeFilesLines
* do not bind temporaries to non-const referencesGabor Greif2010-09-091-1/+1
| | | | | | | | | | | this fixes all analyser test failures in my gcc34-based environment how the cast result could bind to the non-const ref is somewhat mysterious and remains to be investigated; to avoid similar miscompilations (by gcc34 only?) llvm-svn: 113480
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-7/+7
| | | | | | to the new constants. llvm-svn: 112047
* Allow the "size" of a buffer access check to be either signed or unsigned. ↵Jordy Rose2010-08-161-1/+1
| | | | | | Fixes PR7925. llvm-svn: 111205
* Model the effects of strcpy() and stpcpy() in CStringChecker. Other changes:Jordy Rose2010-08-161-16/+201
| | | | | | | | - Fix memcpy() and friends to actually invalidate the destination buffer. - Emit a different message for out-of-bounds buffer accesses if the buffer is being written to. - When conjuring symbols, let ValueManager figure out the type. llvm-svn: 111120
* Update CStringChecker to take advantage of the new metadata symbols and ↵Jordy Rose2010-08-141-87/+245
| | | | | | region change callback. Now does basic tracking of string length for general regions. Currently this is still only used for modeling strlen(). llvm-svn: 111081
* MemRegion can refer to ASTContext without external help.Zhongxing Xu2010-08-111-9/+5
| | | | llvm-svn: 110784
* When checking if a buffer access is valid, first make sure the buffer has a ↵Jordy Rose2010-08-051-11/+15
| | | | | | valid Loc. Fixes PR7830. llvm-svn: 110390
* Groundwork for C string length tracking. Currently only handles the length ↵Jordy Rose2010-07-271-2/+189
| | | | | | of constant string literals, which is not too helpful, and only calls to strlen() are checked. llvm-svn: 109480
* Cleanup in CStringChecker. Now properly bifurcates the state for ↵Jordy Rose2010-07-081-139/+171
| | | | | | zero/nonzero sizes. llvm-svn: 107935
* Add memcmp() and bcmp() to CStringChecker. These check for valid access to ↵Jordy Rose2010-07-071-0/+66
| | | | | | the buffer arguments and have a special-case for when the buffer arguments are known to be the same address, or when the size is zero. llvm-svn: 107761
* Cleanup on CStringChecker and its associated tests. Also check for null ↵Jordy Rose2010-07-071-8/+77
| | | | | | arguments...which are allowed if the access length is 0! llvm-svn: 107759
* Add a new path-sensitive checker for functions in <string.h>, for both ↵Jordy Rose2010-07-061-0/+358
null-terminated strings and memory blocks. Currently only checks memcpy(), memmove(), and bcopy(), but this is intended to be expanded soon. llvm-svn: 107722
OpenPOWER on IntegriCloud