summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers
Commit message (Collapse)AuthorAgeFilesLines
...
* Add raw_ostream include to pacify MSVC.Benjamin Kramer2012-12-011-0/+1
| | | | llvm-svn: 169097
* Include pruning and general cleanup.Benjamin Kramer2012-12-0117-1/+17
| | | | llvm-svn: 169095
* Don't include Type.h in DeclarationName.h.Benjamin Kramer2012-12-012-0/+2
| | | | | | Recursively prune some includes. llvm-svn: 169094
* Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't ↵Benjamin Kramer2012-12-0110-10/+20
| | | | | | | | | pull in all the generated Attr code. Required to pull some functions out of line, but this shouldn't have a perf impact. No functionality change. llvm-svn: 169092
* [analyzer] Fix a crash reported in PR 14400.Anna Zaks2012-11-261-0/+1
| | | | | | | | The AllocaRegion did not have the superRegion (based on LocationContext) as part of it's hash. As a consequence, the AllocaRegions from different frames were uniqued to be the same region. llvm-svn: 168599
* Make helpers static/anonymous.Benjamin Kramer2012-11-221-2/+2
| | | | llvm-svn: 168500
* [analyzer] StreamChecker: Remove now-unnecessary check::EndPath callback.Jordan Rose2012-11-151-46/+1
| | | | | | | Also, don't bother to stop tracking symbols in the return value, either. They are now properly considered live during checkDeadSymbols. llvm-svn: 168069
* [analyzer] MacOSKeychainAPIChecker: Remove now-unnecessary check::EndPath.Jordan Rose2012-11-151-75/+0
| | | | | | | Also, don't bother to stop tracking symbols in the return value, either. They are now properly considered live during checkDeadSymbols. llvm-svn: 168068
* [analyzer] MallocChecker: Remove now-unnecessary check::EndPath callback.Jordan Rose2012-11-151-29/+1
| | | | | | | Also, don't bother to stop tracking symbols in the return value, either. They are now properly considered live during checkDeadSymbols. llvm-svn: 168067
* [analyzer] Address Jordan's code review for r167813.Anna Zaks2012-11-131-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 initWithCharacterAnna Zaks2012-11-131-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 Rose2012-11-072-10/+18
| | | | | | Patch by Sean McBride! llvm-svn: 167537
* [analyzer] Enhance docs for checker callbacks (esp. processRegionChanges).Jordan Rose2012-11-071-13/+28
| | | | | | No functionality change; this checker is only used for documentation. llvm-svn: 167522
* [analyzer] Add symbol escapes logic to the SimpleStreamChecker.Anna Zaks2012-11-061-1/+125
| | | | llvm-svn: 167439
* [analyzer] Remove isWithinInlined. It's been replaced with inTopFrame().Anna Zaks2012-11-061-1/+1
| | | | | | Thanks Jordan. llvm-svn: 167438
* [analyzer] add LocationContext::inTopFrame() helper.Anna Zaks2012-11-031-7/+1
| | | | llvm-svn: 167351
* [analyzer] Convert SimpleStreamChecker over to CallEvent.Jordan Rose2012-11-021-13/+23
| | | | llvm-svn: 167340
* [analyzer] CheckerDocumentation: Change examples for PreStmt and PostStmt.Jordan Rose2012-11-021-9/+9
| | | | llvm-svn: 167339
* [analyzer] Add some convenience accessors to CallEvent, and use them.Jordan Rose2012-11-023-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 Rose2012-11-021-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 Zaks2012-11-021-15/+21
| | | | llvm-svn: 167316
* [analyzer] Convert some of the harder cases over to ProgramStateTrait macros.Jordan Rose2012-11-023-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 Rose2012-11-027-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 Rose2012-11-0241-78/+78
| | | | | | No functionality change. llvm-svn: 167275
* [analyzer] Fix typo in r167186.Jordan Rose2012-11-011-1/+1
| | | | llvm-svn: 167189
* [analyzer] Minor cleanup in SimpleStreamChecker's class definition.Jordan Rose2012-11-011-8/+8
| | | | | | No functionality change. llvm-svn: 167187
* [analyzer] Rename ConditionTruthVal::isTrue to isConstrainedTrue.Jordan Rose2012-11-014-9/+23
| | | | | | | | (and the same for isFalse) No functionality change. llvm-svn: 167186
* [analyzer] Fix a bug in SimpleStreamChecker - return after sink.Anna Zaks2012-10-311-1/+3
| | | | | | Thanks Ted. llvm-svn: 167176
* [analyzer] SimpleStreamChecker - remove evalAssume and other refinementsAnna Zaks2012-10-311-56/+30
| | | | llvm-svn: 167099
* Trim #includes.Ted Kremenek2012-10-301-8/+6
| | | | llvm-svn: 167002
* [analyzer]SimpleStreamChecker: add a TODO for better leak report.Anna Zaks2012-10-301-0/+2
| | | | llvm-svn: 167001
* [analyzer] Fix a bug in REGISTER_MAP_WITH_PROGRAMSTATEAnna Zaks2012-10-301-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_PROGRAMSTATEAnna Zaks2012-10-301-2/+2
| | | | llvm-svn: 166999
* [analyzer] Warn about reallocf with an allocation size of 0, like realloc.Jordan Rose2012-10-301-1/+9
| | | | | | Patch by Sean McBride! llvm-svn: 166995
* [analyzer] New checker for missing super calls in UIViewController subclasses.Jordan Rose2012-10-303-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/refactorAnna Zaks2012-10-291-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 Zaks2012-10-293-0/+234
| | | | | | This is an example checker for catching fopen fclose API misuses. llvm-svn: 166976
* [analyzer] Add checker helpers to CheckerContext.Anna Zaks2012-10-291-0/+2
| | | | | | - Adding Immutable Map to GDM and getIdentifierInfo helper method. llvm-svn: 166975
* [analyzer] Ivar invalidation: identify properties declared in protocols.Anna Zaks2012-10-181-5/+9
| | | | llvm-svn: 166211
* [analyzer] Ivar Invalidation: track ivars in continuations andAnna Zaks2012-10-161-5/+5
| | | | | | @implementation. llvm-svn: 166047
* [analyzer] ObjCContainersASTChecker: minor cleanup and an extra test case.Jordan Rose2012-10-161-10/+4
| | | | | | Follow-up to r165838, which fixed a potential crash. llvm-svn: 166002
* [analyzer] Enhance the error message.Anna Zaks2012-10-151-1/+1
| | | | llvm-svn: 165993
* [analyzer] Do not warn on direct ivar assignments within copy methods.Anna Zaks2012-10-151-0/+2
| | | | llvm-svn: 165992
* Move assertion to not crash tests.Ted Kremenek2012-10-121-2/+1
| | | | llvm-svn: 165842
* Silence static analyzer issue by documenting that in this contextTed Kremenek2012-10-121-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-specificTed Kremenek2012-10-121-0/+3
| | | | | | invariants using assertions. llvm-svn: 165840
* Fix potential crash in ObjCContainersChecker by properly validatingTed Kremenek2012-10-121-0/+5
| | | | | | the number of arguments. llvm-svn: 165838
* Remove OSAtomicChecker.Ted Kremenek2012-10-113-223/+1
| | | | llvm-svn: 165744
* Switch over to BodyFarm implementation of OSAtomicCompareAndSwap andTed Kremenek2012-10-111-1/+1
| | | | | | objc_atomicCompareAndSwap. llvm-svn: 165743
* Move isObjCSelf into Expr.Anna Zaks2012-10-011-13/+6
| | | | llvm-svn: 164966
OpenPOWER on IntegriCloud