- May 05, 2011
-
-
Ted Kremenek authored
Add Checker callback for running a checker at the end of processing an entire TranslationUnit. Patch by Lei Zhang. llvm-svn: 130913
-
- May 03, 2011
-
-
Lenny Maiorani authored
Removing strncpy() checking in CString checker for now. Some significant changes need to be made to properly support modeling of it since it potentially leaves strings non-null terminated. llvm-svn: 130758
-
- May 02, 2011
-
-
Ted Kremenek authored
Tweak the retain/release checker to not stop tracking retained objects when calling C++ methods. This is a temporary solution to prune false positives until we have a general story using annotations. llvm-svn: 130726
-
Ted Kremenek authored
Augment retain/release checker to not warn about tracked objects passed as arguments to C++ constructors. This is a stop-gap measure for Objective-C++ code that uses smart pointers to manage reference counts. llvm-svn: 130711
-
Lenny Maiorani authored
Implements strncasecmp() checker and simplifies some of the logic around creating substrings if necessary and calling the appropriate StringRef::compare/compare_lower(). llvm-svn: 130708
-
- Apr 30, 2011
-
-
Ted Kremenek authored
llvm-svn: 130598
-
- Apr 28, 2011
-
-
Lenny Maiorani authored
Use StringRef::substr() and unbounded StringRef::compare() instead of bounded version of StringRef::compare() because bounded version of StringRef::compare() is going to be removed. llvm-svn: 130425
-
Lenny Maiorani authored
Eliminates an assert in the strncpy/strncat checker caused by not validating a cast was successful. If the value of an argument was unknown, the cast would result in a NULL pointer which was later being dereferenced. This fixes Bugzilla #9806. llvm-svn: 130422
-
Lenny Maiorani authored
llvm-svn: 130398
-
John Wiegley authored
Patch authored by Sohail Somani. Provide parsing and AST support for Windows structured exception handling. llvm-svn: 130366
-
John Wiegley authored
Patch authored by John Wiegley. These are array type traits used for parsing code that employs certain features of the Embarcadero C++ compiler: __array_rank(T) and __array_extent(T, Dim). llvm-svn: 130351
-
- Apr 27, 2011
-
-
Lenny Maiorani authored
More accurately model realloc() when the size argument is 0. realloc() with a size of 0 is equivalent to free(). The memory region should be marked as free and not used again. Unit tests f2_realloc_0(), f6_realloc(), and f7_realloc() contributed by Marshall Clow <mclow.lists@gmail.com>. Thanks! llvm-svn: 130303
-
Ted Kremenek authored
Allow 'Environment::getSVal()' to allow an optional way for checkers to do a direct lookup to values bound to expressions, without resulting to lazy logic. This is critical for the OSAtomicChecker that does a simulated load on any arbitrary expression. llvm-svn: 130292
-
- Apr 26, 2011
-
-
Lenny Maiorani authored
Implements the strncmp() checker just like the strcmp() checker, but with bounds. Requires LLVM svn r129582. llvm-svn: 130161
-
- Apr 25, 2011
-
-
John Wiegley authored
Patch authored by David Abrahams. These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for parsing code that employs certain features of the Embarcadero C++ compiler. llvm-svn: 130122
-
- Apr 23, 2011
-
-
Jay Foad authored
llvm-svn: 130068
-
- Apr 22, 2011
-
-
Ted Kremenek authored
llvm-svn: 130003
-
- Apr 19, 2011
-
-
Anders Carlsson authored
llvm-svn: 129741
-
- Apr 15, 2011
-
-
Richard Smith authored
llvm-svn: 129567
-
Chris Lattner authored
Luis Felipe Strano Moraes! llvm-svn: 129559
-
Peter Collingbourne authored
As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. llvm-svn: 129554
-
Richard Smith authored
llvm-svn: 129541
-
- Apr 12, 2011
-
-
Ted Kremenek authored
llvm-svn: 129395
-
Ted Kremenek authored
Fix another IdempotentOperationsChecker corner case when determining if an active block on the worklist impacts the results of the check. llvm-svn: 129394
-
Ted Kremenek authored
ArrayBoundCheckerV2: don't arbitrarily warn about indexing before the 0-index of a symbolic region. In many cases that isn't really the base offset. llvm-svn: 129366
-
Lenny Maiorani authored
This patch adds modeling of strcmp() to the CString checker. Validates inputs are not NULL and are real C strings, then does the comparison and binds the proper return value. Unit tests included. llvm-svn: 129364
-
Ted Kremenek authored
llvm-svn: 129349
-
Ted Kremenek authored
Fix bug in SimpleSValBuilder where '--' pointer arithmetic was treated like '++' pointer arithmetic. llvm-svn: 129348
-
Ted Kremenek authored
llvm-svn: 129333
-
John McCall authored
for __unknown_anytype resolution to destructively modify the AST. So that's what it does now, which significantly simplifies some of the implementation. Normal member calls work pretty cleanly now, and I added support for propagating unknown-ness through &. llvm-svn: 129331
-
Ted Kremenek authored
llvm-svn: 129308
-
- Apr 11, 2011
-
-
John McCall authored
llvm-svn: 129269
-
Anders Carlsson authored
llvm-svn: 129265
-
- Apr 10, 2011
-
-
Anders Carlsson authored
represents a dynamic cast where we know that the result is always null. For example: struct A { virtual ~A(); }; struct B final : A { }; struct C { }; bool f(B* b) { return dynamic_cast<C*>(b); } llvm-svn: 129256
-
- Apr 09, 2011
-
-
Lenny Maiorani authored
Validates inputs are not NULL, checks for overlapping strings, concatenates the strings checking for buffer overflow, sets the length of the destination string to the sum of the s1 length and the s2 length, binds the return value to the s1 value. llvm-svn: 129215
-
Ted Kremenek authored
Start overhauling static analyzer support for C++ constructors. The inlining support isn't complete, and needs to be reworked to model CallEnter/CallExit (just like all other calls). For now, treat constructors mostly like other function calls, making the analysis of C++ code just a little more useful. llvm-svn: 129166
-
- Apr 07, 2011
-
-
John McCall authored
The idea is that you can create a VarDecl with an unknown type, or a FunctionDecl with an unknown return type, and it will still be valid to access that object as long as you explicitly cast it at every use. I'm still going back and forth about how I want to test this effectively, but I wanted to go ahead and provide a skeletal implementation for the LLDB folks' benefit and because it also improves some diagnostic goodness for placeholder expressions. llvm-svn: 129065
-
- Apr 06, 2011
-
-
John McCall authored
be sure to consume the argument index that actually had the attribute rather than always the first. rdar://problem/9234108 llvm-svn: 128998
-
- Apr 05, 2011
-
-
Lenny Maiorani authored
Add security syntax checker for strcat() which causes the Static Analyzer to generate a warning any time the strcat() function is used with a note suggesting to use a function which provides bounded buffers. CWE-119. Also, brings the security syntax checker more inline with coding standards. llvm-svn: 128916
-
Ted Kremenek authored
Fix PR 9626 (duplicated self-init warnings under -Wuninitialized) with numerous CFG and UninitializedValues analysis changes: 1) Change the CFG to include the DeclStmt for conditional variables, instead of using the condition itself as a faux DeclStmt. 2) Update ExprEngine (the static analyzer) to understand (1), so not to regress. 3) Update UninitializedValues.cpp to initialize all tracked variables to Uninitialized at the start of the function/method. 4) Only use the SelfReferenceChecker (SemaDecl.cpp) on global variables, leaving the dataflow analysis to handle other cases. The combination of (1) and (3) allows the dataflow-based -Wuninitialized to find self-init problems when the initializer contained control-flow. llvm-svn: 128858
-