Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Fix idempotent operations false positive caused by ivars not being ↵ | Ted Kremenek | 2010-08-02 | 1 | -2/+11 | |
| | | | | | | | | invalidated in function calls when the enclosing object had retain/release state. Fixes <rdar://problem/8261992>. llvm-svn: 110068 | |||||
* | Further adjustments to -Wglobal-constructors; works for references and direct | John McCall | 2010-08-02 | 1 | -1/+1 | |
| | | | | | | initializations now. llvm-svn: 110063 | |||||
* | 'Assumption &A' gets default initialized to 'Possible' if it doesn't exist; ↵ | Ted Kremenek | 2010-08-02 | 1 | -8/+5 | |
| | | | | | | | | no need to two lookups in the hashtable. llvm-svn: 110059 | |||||
* | Improve flat store: MemRegion::getAsOffset() computes a region's offset within | Zhongxing Xu | 2010-08-02 | 5 | -17/+88 | |
| | | | | | | | | the top-level object. FlatStore now can bind and retrieve element and field regions. PR7297 is fixed by flat store. llvm-svn: 110020 | |||||
* | After a lengthy design discussion, add support for "ownership attributes" ↵ | Ted Kremenek | 2010-07-31 | 1 | -17/+156 | |
| | | | | | | for malloc/free checking. Patch by Andrew McGregor! llvm-svn: 109939 | |||||
* | Uncomment unfinished work bailout in IdempotentOperationsChecker. | Tom Care | 2010-07-30 | 1 | -2/+2 | |
| | | | | llvm-svn: 109893 | |||||
* | Use a LazyCompoundVal to handle initialization with a string literal, rather ↵ | Jordy Rose | 2010-07-29 | 1 | -35/+12 | |
| | | | | | | than copying each character. llvm-svn: 109734 | |||||
* | Teach GRExprEngine::VisitLValue() about FloatingLiteral, ImaginaryLiteral, ↵ | Ted Kremenek | 2010-07-29 | 1 | -0/+3 | |
| | | | | | | and CharacterLiteral. Fixes an assertion failure reported in PR 7675. llvm-svn: 109719 | |||||
* | Augment RegionStore::BindStruct() to bind symbolicated struct values. This ↵ | Ted Kremenek | 2010-07-29 | 1 | -6/+8 | |
| | | | | | | fixes a false path issue reported in <rdar://problem/8243408> and also spurs another cause where the idempotent operations checker fires. llvm-svn: 109710 | |||||
* | Change SymbolManager::canSymbolicate() to return true for RecordTypes. | Ted Kremenek | 2010-07-29 | 1 | -1/+10 | |
| | | | | llvm-svn: 109709 | |||||
* | Explicitly guard in BasicStore from storing to non-scalars. | Ted Kremenek | 2010-07-29 | 1 | -5/+3 | |
| | | | | llvm-svn: 109708 | |||||
* | Remove extraneous guards around the call to getConjuredSymbolVal(). These ↵ | Ted Kremenek | 2010-07-29 | 1 | -6/+4 | |
| | | | | | | checks are already done within getConjuredSymbolVal() itself. llvm-svn: 109707 | |||||
* | Added some false positive checking to UnreachableCodeChecker | Tom Care | 2010-07-27 | 1 | -31/+92 | |
| | | | | | | | | | - Allowed reporting of dead macros - Added path walking function to search for false positives in conditional statements - Updated some affected tests - Added some false positive test cases llvm-svn: 109561 | |||||
* | Extracted out some useful common functions in IdempotentOperationChecker to ↵ | Tom Care | 2010-07-27 | 3 | -86/+86 | |
| | | | | | | their own CheckerHelpers file. llvm-svn: 109560 | |||||
* | Finesse 'idempotent operations' analyzer issues to include the opcode of the ↵ | Ted Kremenek | 2010-07-27 | 1 | -10/+16 | |
| | | | | | | binary operator for clearer error reporting. Also remove the 'Idempotent operation' prefix in messages; it's redundant since the bug type is the same. llvm-svn: 109527 | |||||
* | Put 'Idempotent operations' static analyzer issues in the 'Dead code' category. | Ted Kremenek | 2010-07-27 | 1 | -1/+2 | |
| | | | | llvm-svn: 109517 | |||||
* | Don't warn about unreachable code if the block starts with ↵ | Jordy Rose | 2010-07-27 | 1 | -1/+16 | |
| | | | | | | | | __builtin_unreachable(). The next step is to warn if a block labeled unreachable is, in fact, reachable. Somewhat related to PR810. llvm-svn: 109487 | |||||
* | Groundwork for C string length tracking. Currently only handles the length ↵ | Jordy Rose | 2010-07-27 | 1 | -2/+189 | |
| | | | | | | of constant string literals, which is not too helpful, and only calls to strlen() are checked. llvm-svn: 109480 | |||||
* | Added an path-sensitive unreachable code checker to the experimental ↵ | Tom Care | 2010-07-23 | 4 | -9/+154 | |
| | | | | | | | | | | analyzer checks. - Created a new class to do post-analysis - Updated several test cases with unreachable code to expect a warning - Added some general tests llvm-svn: 109286 | |||||
* | Add FILE* leak check to StreamChecker. Patch by Lei Zhang. | Zhongxing Xu | 2010-07-23 | 1 | -3/+78 | |
| | | | | llvm-svn: 109225 | |||||
* | Change arg type. | Zhongxing Xu | 2010-07-23 | 1 | -1/+1 | |
| | | | | llvm-svn: 109218 | |||||
* | Delete unnecessary const_cast. | Zhongxing Xu | 2010-07-23 | 1 | -1/+1 | |
| | | | | llvm-svn: 109211 | |||||
* | AnalysisContext is not const. | Zhongxing Xu | 2010-07-23 | 1 | -1/+1 | |
| | | | | llvm-svn: 109210 | |||||
* | This patch adds support for tmpfile in StreamChecker. Patch by Lei Zhang. | Zhongxing Xu | 2010-07-22 | 1 | -7/+25 | |
| | | | | llvm-svn: 109106 | |||||
* | Make a bunch of new data structures for the new analysis | Zhongxing Xu | 2010-07-22 | 2 | -4/+84 | |
| | | | | | | | engine of the new translation unit. State marshal is there but no real work is done. End nodes are passed back. llvm-svn: 109105 | |||||
* | Move some methods inline. | Zhongxing Xu | 2010-07-21 | 1 | -34/+0 | |
| | | | | llvm-svn: 108988 | |||||
* | Constify all references to Stmt* and CFGBlock* in libChecker. | Zhongxing Xu | 2010-07-20 | 7 | -174/+182 | |
| | | | | llvm-svn: 108811 | |||||
* | Constify. | Zhongxing Xu | 2010-07-20 | 1 | -12/+15 | |
| | | | | llvm-svn: 108804 | |||||
* | remove const_cast. | Zhongxing Xu | 2010-07-20 | 1 | -2/+1 | |
| | | | | llvm-svn: 108803 | |||||
* | constify. | Zhongxing Xu | 2010-07-20 | 1 | -2/+2 | |
| | | | | llvm-svn: 108801 | |||||
* | Constify. | Zhongxing Xu | 2010-07-20 | 3 | -11/+12 | |
| | | | | llvm-svn: 108800 | |||||
* | remove CallInliner.cpp. | Zhongxing Xu | 2010-07-19 | 1 | -0/+0 | |
| | | | | llvm-svn: 108670 | |||||
* | Add double close check to StreamChecker. Patch by Lei Zhang. | Zhongxing Xu | 2010-07-19 | 1 | -4/+87 | |
| | | | | llvm-svn: 108669 | |||||
* | Reapply r108617. | Zhongxing Xu | 2010-07-19 | 7 | -73/+70 | |
| | | | | llvm-svn: 108668 | |||||
* | BUILD_ARCHIVE is the default for libraries, no need to set it. | Chris Lattner | 2010-07-18 | 1 | -1/+0 | |
| | | | | llvm-svn: 108633 | |||||
* | Revert r108617, it broke the build. | Benjamin Kramer | 2010-07-17 | 6 | -39/+73 | |
| | | | | llvm-svn: 108621 | |||||
* | Prepare the analyzer for the callee in another translation unit: | Zhongxing Xu | 2010-07-17 | 6 | -73/+39 | |
| | | | | | | | Let AnalysisContext contain a TranslationUnit. Let CallEnter refer to an AnalysisContext instead of a FunctionDecl. llvm-svn: 108617 | |||||
* | Fix '<rdar://problem/8202272> __imag passed non-complex should not crash' by ↵ | Ted Kremenek | 2010-07-17 | 1 | -2/+1 | |
| | | | | | | removing a bogus assertion. llvm-svn: 108602 | |||||
* | Fix APFloat assertion failure in IdempotentOperationChecker resulting in having | Ted Kremenek | 2010-07-17 | 1 | -4/+6 | |
| | | | | | | an APFloat with different "float semantics" than the compared float literal. llvm-svn: 108590 | |||||
* | Improved false positive rate for the idempotent operations checker and moved ↵ | Tom Care | 2010-07-16 | 5 | -7/+82 | |
| | | | | | | | | | | it into the default path-sensitive analysis options. - Added checks for static local variables, self assigned parameters, and truncating/extending self assignments - Removed command line option (now default with --analyze) - Updated test cases to pass with idempotent operation warnings llvm-svn: 108550 | |||||
* | Pass StringRefs by value. | Benjamin Kramer | 2010-07-14 | 1 | -1/+1 | |
| | | | | llvm-svn: 108375 | |||||
* | Introduce a new cast kind for an "lvalue bitcast", which handles | Douglas Gregor | 2010-07-13 | 1 | -0/+1 | |
| | | | | | | | | | | | | | | | | reinterpret_casts (possibly indirectly via C-style/functional casts) on values, e.g., int i; reinterpret_cast<short&>(i); The IR generated for this is essentially the same as for *reinterpret_cast<short*>(&i). Fixes PR6437, PR7593, and PR7344. llvm-svn: 108294 | |||||
* | Cleanup in CStringChecker. Now properly bifurcates the state for ↵ | Jordy Rose | 2010-07-08 | 1 | -139/+171 | |
| | | | | | | zero/nonzero sizes. llvm-svn: 107935 | |||||
* | Reinstate the fix for PR7556. A silly use of isTrivial() was | Douglas Gregor | 2010-07-08 | 1 | -2/+2 | |
| | | | | | | suppressing copies of objects with trivial copy constructors. llvm-svn: 107857 | |||||
* | Revert r107828 and r107827, the fix for PR7556, which seems to be | Douglas Gregor | 2010-07-07 | 1 | -2/+2 | |
| | | | | | | breaking bootstrap on Linux. llvm-svn: 107837 | |||||
* | Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its | Douglas Gregor | 2010-07-07 | 1 | -2/+2 | |
| | | | | | | newly-narrowed scope. No functionality change. llvm-svn: 107828 | |||||
* | Simplify code and remove comment that is no longer relevant. | Argyrios Kyrtzidis | 2010-07-07 | 1 | -9/+2 | |
| | | | | llvm-svn: 107772 | |||||
* | Remove Decl::getCompoundBody(). | Argyrios Kyrtzidis | 2010-07-07 | 1 | -1/+1 | |
| | | | | | | | | This has 2 (slight) advantages: -Make explicit at getBody()'s callsite that we expect/handle only CompoundStmt and not CXXTryStmt. -Better tracking of Decl::getBody()'s callsites. llvm-svn: 107771 | |||||
* | Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead ↵ | Argyrios Kyrtzidis | 2010-07-07 | 4 | -10/+10 | |
| | | | | | | | | of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. Makes de-serialization of the function body even more "lazier". llvm-svn: 107768 | |||||
* | Add memcmp() and bcmp() to CStringChecker. These check for valid access to ↵ | Jordy Rose | 2010-07-07 | 1 | -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 |