aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/CStringChecker.cpp
AgeCommit message (Collapse)Author
2010-12-22[analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> ↵Argyrios Kyrtzidis
libclangGRCore git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-22[analyzer] Refactoring: include/clang/Checker -> include/clang/GRArgyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-20Rename 'Generate[Node,Sink]' to 'generate[Node,Sink]'.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122270 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02Merge ValueManager into SValBuilder.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120696 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-01Rename all 'AssumeXXX' methods in libCheckerTed Kremenek
to 'assumeXXX'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120614 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-01Rename all 'EvalXXX' methods in libChecker toTed Kremenek
'evalXXX'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-01Rename 'SValuator' to 'SValBuilder'. The new nameTed Kremenek
reflects what the class actually does. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120605 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-26Rename CXXObjectRegion to CXXTempObjectRegion.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120176 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-24Adjust method calls to reflect name changes inTed Kremenek
ImmutableSet/ImmtuableMap/ImmutableList APIs. Along the way, clean up some method names in the static analyzer so that they are more descriptive and/or start with lowercase letters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120071 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-01Teach the CStringChecker and PthreadLockChecker about non-identifierDouglas Gregor
declaration names, from Jim Goodnow II! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117970 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09do not bind temporaries to non-const referencesGabor Greif
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?) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113480 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall
to the new constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16Allow the "size" of a buffer access check to be either signed or unsigned. ↵Jordy Rose
Fixes PR7925. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16Model the effects of strcpy() and stpcpy() in CStringChecker. Other changes:Jordy Rose
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111120 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-14Update CStringChecker to take advantage of the new metadata symbols and ↵Jordy Rose
region change callback. Now does basic tracking of string length for general regions. Currently this is still only used for modeling strlen(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111081 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11MemRegion can refer to ASTContext without external help.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110784 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05When checking if a buffer access is valid, first make sure the buffer has a ↵Jordy Rose
valid Loc. Fixes PR7830. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110390 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-27Groundwork for C string length tracking. Currently only handles the length ↵Jordy Rose
of constant string literals, which is not too helpful, and only calls to strlen() are checked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109480 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-08Cleanup in CStringChecker. Now properly bifurcates the state for ↵Jordy Rose
zero/nonzero sizes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107935 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-07Add memcmp() and bcmp() to CStringChecker. These check for valid access to ↵Jordy Rose
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107761 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-07Cleanup on CStringChecker and its associated tests. Also check for null ↵Jordy Rose
arguments...which are allowed if the access length is 0! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107759 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06Add a new path-sensitive checker for functions in <string.h>, for both ↵Jordy Rose
null-terminated strings and memory blocks. Currently only checks memcpy(), memmove(), and bcopy(), but this is intended to be expanded soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107722 91177308-0d34-0410-b5e6-96231b3b80d8