Ted Kremenek
90af90967a
Merge ValueManager into SValBuilder.
...
llvm-svn: 120696
2010-12-02 07:49:45 +00:00
Ted Kremenek
c5bea1e337
Rename all 'AssumeXXX' methods in libChecker
...
to 'assumeXXX'.
llvm-svn: 120614
2010-12-01 22:16:56 +00:00
Ted Kremenek
dc891429e4
Rename all 'EvalXXX' methods in libChecker to
...
'evalXXX'.
llvm-svn: 120609
2010-12-01 21:57:22 +00:00
Ted Kremenek
9d0bb1e366
Rename 'SValuator' to 'SValBuilder'. The new name
...
reflects what the class actually does.
llvm-svn: 120605
2010-12-01 21:28:31 +00:00
Zhongxing Xu
032071688b
Rename CXXObjectRegion to CXXTempObjectRegion.
...
llvm-svn: 120176
2010-11-26 08:52:48 +00:00
Ted Kremenek
b3b56c6bcd
Adjust method calls to reflect name changes in
...
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.
llvm-svn: 120071
2010-11-24 00:54:37 +00:00
Douglas Gregor
4b8eca88b0
Teach the CStringChecker and PthreadLockChecker about non-identifier
...
declaration names, from Jim Goodnow II!
llvm-svn: 117970
2010-11-01 23:16:05 +00:00
Gabor Greif
230ddf37af
do not bind temporaries to non-const references
...
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
2010-09-09 10:51:37 +00:00
John McCall
e302792b61
GCC didn't care for my attempt at API compatibility, so brute-force everything
...
to the new constants.
llvm-svn: 112047
2010-08-25 11:45:40 +00:00
Jordy Rose
5ccde8593f
Allow the "size" of a buffer access check to be either signed or unsigned. Fixes PR7925.
...
llvm-svn: 111205
2010-08-16 23:25:19 +00:00
Jordy Rose
722f558f07
Model the effects of strcpy() and stpcpy() in CStringChecker. Other changes:
...
- 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
2010-08-16 07:51:42 +00:00
Jordy Rose
2a2e21c902
Update CStringChecker to take advantage of the new metadata symbols and 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
2010-08-14 21:02:52 +00:00
Zhongxing Xu
8de0a3d8c3
MemRegion can refer to ASTContext without external help.
...
llvm-svn: 110784
2010-08-11 06:10:55 +00:00
Jordy Rose
afdb053618
When checking if a buffer access is valid, first make sure the buffer has a valid Loc. Fixes PR7830.
...
llvm-svn: 110390
2010-08-05 23:11:30 +00:00
Jordy Rose
b052e8f436
Groundwork for C string length tracking. Currently only handles the length of constant string literals, which is not too helpful, and only calls to strlen() are checked.
...
llvm-svn: 109480
2010-07-27 01:37:31 +00:00
Jordy Rose
d5d2e50f3e
Cleanup in CStringChecker. Now properly bifurcates the state for zero/nonzero sizes.
...
llvm-svn: 107935
2010-07-08 23:57:29 +00:00
Jordy Rose
65136fb669
Add memcmp() and bcmp() to CStringChecker. These check for valid access to 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
2010-07-07 08:15:01 +00:00
Jordy Rose
33c829a6fd
Cleanup on CStringChecker and its associated tests. Also check for null arguments...which are allowed if the access length is 0!
...
llvm-svn: 107759
2010-07-07 07:48:06 +00:00
Jordy Rose
134a236a14
Add a new path-sensitive checker for functions in <string.h>, for both null-terminated strings and memory blocks. Currently only checks memcpy(), memmove(), and bcopy(), but this is intended to be expanded soon.
...
llvm-svn: 107722
2010-07-06 23:11:01 +00:00