Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | [analyzer] Address Jordan's code review for r167813. | Anna Zaks | 2012-11-13 | 1 | -20/+15 | |
| | | | | | | | This simplifies logic, fixes a bug, and adds a test case. Thanks Jordan! llvm-svn: 167868 | |||||
* | Fix a Malloc Checker FP by tracking return values from initWithCharacter | Anna Zaks | 2012-11-13 | 1 | -20/+81 | |
| | | | | | | | | | | and other functions. When these functions return null, the pointer is not freed by them/ownership is not transfered. So we should allow the user to free the pointer by calling another function when the return value is NULL. llvm-svn: 167813 | |||||
* | [analyzer] Check that the argument to CFMakeCollectable is non-NULL. | Jordan Rose | 2012-11-07 | 2 | -10/+18 | |
| | | | | | | Patch by Sean McBride! llvm-svn: 167537 | |||||
* | [analyzer] Enhance docs for checker callbacks (esp. processRegionChanges). | Jordan Rose | 2012-11-07 | 1 | -13/+28 | |
| | | | | | | No functionality change; this checker is only used for documentation. llvm-svn: 167522 | |||||
* | [analyzer] Add symbol escapes logic to the SimpleStreamChecker. | Anna Zaks | 2012-11-06 | 1 | -1/+125 | |
| | | | | llvm-svn: 167439 | |||||
* | [analyzer] Remove isWithinInlined. It's been replaced with inTopFrame(). | Anna Zaks | 2012-11-06 | 1 | -1/+1 | |
| | | | | | | Thanks Jordan. llvm-svn: 167438 | |||||
* | [analyzer] add LocationContext::inTopFrame() helper. | Anna Zaks | 2012-11-03 | 1 | -7/+1 | |
| | | | | llvm-svn: 167351 | |||||
* | [analyzer] Convert SimpleStreamChecker over to CallEvent. | Jordan Rose | 2012-11-02 | 1 | -13/+23 | |
| | | | | llvm-svn: 167340 | |||||
* | [analyzer] CheckerDocumentation: Change examples for PreStmt and PostStmt. | Jordan Rose | 2012-11-02 | 1 | -9/+9 | |
| | | | | llvm-svn: 167339 | |||||
* | [analyzer] Add some convenience accessors to CallEvent, and use them. | Jordan Rose | 2012-11-02 | 3 | -11/+7 | |
| | | | | | | | | These are CallEvent-equivalents of helpers already accessible in CheckerContext, as part of making it easier for new checkers to be written using CallEvent rather than raw CallExprs. llvm-svn: 167338 | |||||
* | [analyzer] isCLibraryFunction: check that the function is at TU-scope. | Jordan Rose | 2012-11-02 | 1 | -5/+4 | |
| | | | | | | | Also, Decls already carry a pointer to the ASTContext, so there's no need to pass an extra argument to the predicate. llvm-svn: 167337 | |||||
* | [analyzer] Factor SimpleStreamChecker pulling out isLeaked(). | Anna Zaks | 2012-11-02 | 1 | -15/+21 | |
| | | | | llvm-svn: 167316 | |||||
* | [analyzer] Convert some of the harder cases over to ProgramStateTrait macros. | Jordan Rose | 2012-11-02 | 3 | -62/+24 | |
| | | | | | | | Add FIXMEs for the traits visible from multiple translation units. Currently the macros hide their key types in an anonymous namespace. llvm-svn: 167277 | |||||
* | [analyzer] Use nice macros for the common ProgramStateTraits (map, set, list). | Jordan Rose | 2012-11-02 | 7 | -114/+43 | |
| | | | | | | | | | Also, move the REGISTER_*_WITH_PROGRAMSTATE macros to ProgramStateTrait.h. This doesn't get rid of /all/ explicit uses of ProgramStatePartialTrait, but it does get a lot of them. llvm-svn: 167276 | |||||
* | [analyzer] Rename 'EmitReport' to 'emitReport'. | Jordan Rose | 2012-11-02 | 41 | -78/+78 | |
| | | | | | | No functionality change. llvm-svn: 167275 | |||||
* | [analyzer] Fix typo in r167186. | Jordan Rose | 2012-11-01 | 1 | -1/+1 | |
| | | | | llvm-svn: 167189 | |||||
* | [analyzer] Minor cleanup in SimpleStreamChecker's class definition. | Jordan Rose | 2012-11-01 | 1 | -8/+8 | |
| | | | | | | No functionality change. llvm-svn: 167187 | |||||
* | [analyzer] Rename ConditionTruthVal::isTrue to isConstrainedTrue. | Jordan Rose | 2012-11-01 | 4 | -9/+23 | |
| | | | | | | | | (and the same for isFalse) No functionality change. llvm-svn: 167186 | |||||
* | [analyzer] Fix a bug in SimpleStreamChecker - return after sink. | Anna Zaks | 2012-10-31 | 1 | -1/+3 | |
| | | | | | | Thanks Ted. llvm-svn: 167176 | |||||
* | [analyzer] SimpleStreamChecker - remove evalAssume and other refinements | Anna Zaks | 2012-10-31 | 1 | -56/+30 | |
| | | | | llvm-svn: 167099 | |||||
* | Trim #includes. | Ted Kremenek | 2012-10-30 | 1 | -8/+6 | |
| | | | | llvm-svn: 167002 | |||||
* | [analyzer]SimpleStreamChecker: add a TODO for better leak report. | Anna Zaks | 2012-10-30 | 1 | -0/+2 | |
| | | | | llvm-svn: 167001 | |||||
* | [analyzer] Fix a bug in REGISTER_MAP_WITH_PROGRAMSTATE | Anna Zaks | 2012-10-30 | 1 | -7/+5 | |
| | | | | | | | | | | | The ImmutableMap should not be the key into the GDM map as there could be several entries with the same map type. Thanks, Jordan. This complicates the usage of the macro a bit. When we want to retrieve the whole map, we need to use another name. Currently, I set it to be Name ## Ty as in "type of the map we are storing in the ProgramState". llvm-svn: 167000 | |||||
* | [analyzer] Rename REGISTER_MAP_WITH_GDM ->REGISTER_MAP_WITH_PROGRAMSTATE | Anna Zaks | 2012-10-30 | 1 | -2/+2 | |
| | | | | llvm-svn: 166999 | |||||
* | [analyzer] Warn about reallocf with an allocation size of 0, like realloc. | Jordan Rose | 2012-10-30 | 1 | -1/+9 | |
| | | | | | | Patch by Sean McBride! llvm-svn: 166995 | |||||
* | [analyzer] New checker for missing super calls in UIViewController subclasses. | Jordan Rose | 2012-10-30 | 3 | -0/+208 | |
| | | | | | | | | | | | | This is a syntactic checker aimed at helping iOS programmers correctly subclass and override the methods of UIViewController. While this should eventually be covered by the 'objc_requires_super' attribute, this checker can be used with the existing iOS SDKs without any header changes. This new checker is currently named 'alpha.osx.cocoa.MissingSuperCall'. Patch by Julian Mayer! llvm-svn: 166993 | |||||
* | [analyzer] Malloc checker cleanup/refactor | Anna Zaks | 2012-10-29 | 1 | -9/+7 | |
| | | | | | | | No need for the auxiliary flag. No need to generate a leak node when there is no error. llvm-svn: 166977 | |||||
* | [analyzer] Add SimpleStreamChecker. | Anna Zaks | 2012-10-29 | 3 | -0/+234 | |
| | | | | | | This is an example checker for catching fopen fclose API misuses. llvm-svn: 166976 | |||||
* | [analyzer] Add checker helpers to CheckerContext. | Anna Zaks | 2012-10-29 | 1 | -0/+2 | |
| | | | | | | - Adding Immutable Map to GDM and getIdentifierInfo helper method. llvm-svn: 166975 | |||||
* | [analyzer] Ivar invalidation: identify properties declared in protocols. | Anna Zaks | 2012-10-18 | 1 | -5/+9 | |
| | | | | llvm-svn: 166211 | |||||
* | [analyzer] Ivar Invalidation: track ivars in continuations and | Anna Zaks | 2012-10-16 | 1 | -5/+5 | |
| | | | | | | @implementation. llvm-svn: 166047 | |||||
* | [analyzer] ObjCContainersASTChecker: minor cleanup and an extra test case. | Jordan Rose | 2012-10-16 | 1 | -10/+4 | |
| | | | | | | Follow-up to r165838, which fixed a potential crash. llvm-svn: 166002 | |||||
* | [analyzer] Enhance the error message. | Anna Zaks | 2012-10-15 | 1 | -1/+1 | |
| | | | | llvm-svn: 165993 | |||||
* | [analyzer] Do not warn on direct ivar assignments within copy methods. | Anna Zaks | 2012-10-15 | 1 | -0/+2 | |
| | | | | llvm-svn: 165992 | |||||
* | Move assertion to not crash tests. | Ted Kremenek | 2012-10-12 | 1 | -2/+1 | |
| | | | | llvm-svn: 165842 | |||||
* | Silence static analyzer issue by documenting that in this context | Ted Kremenek | 2012-10-12 | 1 | -0/+1 | |
| | | | | | | | that a DeclRefExpr can never return a null decl. We possibly should hoist this into getDecl() itself. llvm-svn: 165841 | |||||
* | Silence null dereference warnings by documenting context-specific | Ted Kremenek | 2012-10-12 | 1 | -0/+3 | |
| | | | | | | invariants using assertions. llvm-svn: 165840 | |||||
* | Fix potential crash in ObjCContainersChecker by properly validating | Ted Kremenek | 2012-10-12 | 1 | -0/+5 | |
| | | | | | | the number of arguments. llvm-svn: 165838 | |||||
* | Remove OSAtomicChecker. | Ted Kremenek | 2012-10-11 | 3 | -223/+1 | |
| | | | | llvm-svn: 165744 | |||||
* | Switch over to BodyFarm implementation of OSAtomicCompareAndSwap and | Ted Kremenek | 2012-10-11 | 1 | -1/+1 | |
| | | | | | | objc_atomicCompareAndSwap. llvm-svn: 165743 | |||||
* | Move isObjCSelf into Expr. | Anna Zaks | 2012-10-01 | 1 | -13/+6 | |
| | | | | llvm-svn: 164966 | |||||
* | [analyzer] Address Jordan's review for r164868. | Anna Zaks | 2012-10-01 | 1 | -16/+14 | |
| | | | | llvm-svn: 164965 | |||||
* | Add checker debug.ConfigDumper to dump the contents of the configuration table. | Ted Kremenek | 2012-10-01 | 2 | -0/+39 | |
| | | | | | | | The format of this output is a WIP; largely I'm bringing it up now for regression testing. We can evolve the output format over time. llvm-svn: 164953 | |||||
* | [analyzer] Re-implement IvarInvalidationChecker so that it verifies that | Anna Zaks | 2012-09-29 | 1 | -62/+259 | |
| | | | | | | | | | | | the validation occurred. The original implementation was pessimistic - we assumed that ivars which escape are invalidated. This version is optimistic, it assumes that the ivars will always be explicitly invalidated: either set to nil or sent an invalidation message. llvm-svn: 164868 | |||||
* | [analyzer] Address Jordan's code review for r164790. | Anna Zaks | 2012-09-27 | 1 | -18/+18 | |
| | | | | llvm-svn: 164803 | |||||
* | [analyzer] IvarInvalidation: track synthesized ivars and allow escape | Anna Zaks | 2012-09-27 | 1 | -31/+69 | |
| | | | | | | through property getters. llvm-svn: 164802 | |||||
* | Unbreak cmake build | Anna Zaks | 2012-09-27 | 1 | -0/+1 | |
| | | | | | | (fixup for r164790) llvm-svn: 164791 | |||||
* | [analyzer] Add an experimental ObjC direct ivar assignment checker. | Anna Zaks | 2012-09-27 | 2 | -0/+182 | |
| | | | | llvm-svn: 164790 | |||||
* | [analyzer] Address Jordan's code review comments for r164716. | Anna Zaks | 2012-09-27 | 2 | -15/+17 | |
| | | | | llvm-svn: 164788 | |||||
* | Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵ | Sylvestre Ledru | 2012-09-27 | 1 | -2/+2 | |
| | | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766 llvm-svn: 164769 |