summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/retain-release.m
Commit message (Collapse)AuthorAgeFilesLines
...
* Rework checker "packages" and groups to be more hierarchical.Ted Kremenek2011-03-241-2/+2
| | | | llvm-svn: 128187
* [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best ↵Argyrios Kyrtzidis2011-02-281-2/+2
| | | | | | misnomer award. llvm-svn: 126676
* [analyzer] Migrate NoReturnFunctionChecker to CheckerV2.Argyrios Kyrtzidis2011-02-281-2/+2
| | | | llvm-svn: 126613
* Allow passing a list of comma separated checker names to -analyzer-checker, e.g:Argyrios Kyrtzidis2011-02-241-2/+2
| | | | | | -analyzer-checker=cocoa,unix llvm-svn: 126372
* Implement a warning for known shift overflows on constant shiftChandler Carruth2011-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | expressions. Consider the code: int64_t i = 10 << 30; This compiles fine, but most developers expect it to produce the value for 10 gigs, not -2 gigs. This is actually undefined behavior because the LHS is a signed integer type. The warning is currently gated behind -Wshift-overflow. There is a special case where only the sign bit is overridden that gets a custom error message and is by default ignored. This case is much less likely to cause observed buggy behavior, it's just undefined behavior according to the spec. This warning can be enabled with -Wshift-sign-overflow. Original patch by Oleg Slezberg, with style tweaks and some correctness fixes by me. llvm-svn: 126342
* [analyzer] Use the new registration mechanism on the apple checkers:Argyrios Kyrtzidis2011-02-161-2/+2
| | | | | | | | | | NilArgChecker CFNumberCreateChecker NSAutoreleasePoolChecker CFRetainReleaseChecker ClassReleaseChecker llvm-svn: 125636
* Wire up attributes 'ns_consumed' and 'cf_consumed' in the static analyzer's ↵Ted Kremenek2011-01-271-1/+27
| | | | | | ObjC retain/release checker. llvm-svn: 124386
* Hook up attribute ns_consumes_self in the ObjC retain/release checker in the ↵Ted Kremenek2011-01-271-1/+18
| | | | | | static analyzer. llvm-svn: 124360
* Change the wording of the bad-decl-for-attribute warning and errorJohn McCall2011-01-251-1/+1
| | | | | | to make it clear that we're talking about the declarations and not the types. llvm-svn: 124175
* Add the ns_consumes_self, ns_consumed, cf_consumed, and ns_returns_autoreleasedJohn McCall2011-01-251-1/+1
| | | | | | attributes for the benefit of the static analyzer. llvm-svn: 124174
* [analyzer] Introduce ObjCSelfInitChecker, which checks initialization ↵Argyrios Kyrtzidis2011-01-111-2/+2
| | | | | | | | | methods to verify that they assign 'self' to the result of an initialization call (e.g. [super init], or [self initWith..]) before using any instance variable or returning 'self'. llvm-svn: 123264
* Revise Cocoa conventions detection: 'copy' and 'mutableCopy'Ted Kremenek2010-12-171-4/+4
| | | | | | | | only indicates the create rule if it starts at the beginning of the method name, not within the method name. llvm-svn: 122036
* Add test case for r120795.Ted Kremenek2010-12-031-0/+24
| | | | llvm-svn: 120796
* Add test case for <rdar://problem/8356342>.Ted Kremenek2010-10-281-0/+19
| | | | llvm-svn: 117525
* Correctly handle 'Class<...>' when examining Cocoa conventions in the static ↵Ted Kremenek2010-08-051-0/+9
| | | | | | analyzer. Fixes a crash reported in <rdar://problem/8272168>. Patch by Henry Mason! llvm-svn: 110289
* Oops, tabs --> spaces in test.Jordy Rose2010-07-061-10/+10
| | | | llvm-svn: 107634
* Improve NULL-checking for CFRetain/CFRelease. We now remember that the ↵Jordy Rose2010-07-061-0/+14
| | | | | | argument was non-NULL, and we report where the null assumption came from (like AttrNonNullChecker already did). llvm-svn: 107633
* Update retain-release checker to understand changes to how 'super' is ↵Ted Kremenek2010-05-211-0/+12
| | | | | | | | represented in the ASTs. Fixes <rdar://problem/8015556>. llvm-svn: 104389
* Fix NoReturnFunctionChecker to properly look at a function's typeTed Kremenek2010-03-261-2/+7
| | | | | | when determining if it returns. Fixes <rdar://problem/7796563>. llvm-svn: 99663
* Recognize attributes ns_returns_not_retained and cf_returns_not_retainedTed Kremenek2010-02-181-0/+22
| | | | | | in the static analyzer. llvm-svn: 96539
* Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.Ted Kremenek2010-02-051-2/+2
| | | | llvm-svn: 95348
* add a bunch of missing prototypes to testsChris Lattner2010-01-091-0/+2
| | | | llvm-svn: 93072
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-2/+2
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Replace clang-cc with clang -cc1.Zhongxing Xu2009-12-141-2/+2
| | | | llvm-svn: 91272
* Add a PostVisitBlockExpr() method to RetainReleaseChecker to query forTed Kremenek2009-11-261-2/+0
| | | | | | | | the set of variables "captured" by a block. Until the analysis gets more sophisticated, for now we stop the retain count tracking of any objects (transitively) referenced by these variables. llvm-svn: 89929
* Add really basic support for blocks in the retain/release checker. For now, ↵Ted Kremenek2009-11-251-2/+35
| | | | | | anytime we pass a tracked object to a block call we stop tracking it. llvm-svn: 89831
* Add simple static analyzer checker to check for sending 'release', 'retain', ↵Ted Kremenek2009-11-201-0/+13
| | | | | | etc. directly to a class. Fixes <rdar://problem/7252064>. llvm-svn: 89449
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-1/+1
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* retain/release checker: CGBitmapContextCreateWithData() returns an owned object.Ted Kremenek2009-11-031-1/+1
| | | | llvm-svn: 85867
* retain/release checker: Add special handling of CGBitmapContextCreateWithData().Ted Kremenek2009-11-031-0/+26
| | | | | Fixes: <rdar://problem/7358899> llvm-svn: 85864
* retain/release checker: allow 'new', 'copy', 'alloc', 'init' prefix to start ↵Ted Kremenek2009-10-201-0/+22
| | | | | | | before '_' when determining Cocoa fundamental rule. Fixes: <rdar://problem/7265711> llvm-svn: 84569
* retain/release checker: Use simpler utility method for creating class method ↵Ted Kremenek2009-10-151-0/+16
| | | | | | summaries. No functionality change. llvm-svn: 84210
* retain/release checker: Recognize that calls toTed Kremenek2009-10-141-0/+100
| | | | | | | | | | 'CVPixelBufferCreateWithPlanarBytes()' and 'CVPixelBufferCreateWithBytes' (Core Video API) can indirectly release a pixel buffer object via a callback. This fixes <rdar://problem/7283567>. llvm-svn: 84064
* retain/release checker: retained objects passed to pthread_create (asTed Kremenek2009-10-131-0/+31
| | | | | | | | the data argument) should not be tracked further until we support full IPA. (fixes <rdar://problem/7299394>) llvm-svn: 84047
* Fix bad grammar in static analyzer diagnostic. Reported by Robert Purves!Ted Kremenek2009-10-011-1/+1
| | | | llvm-svn: 83204
* Add static analyzer transfer function support for __builtin_offsetof.Ted Kremenek2009-09-151-0/+36
| | | | llvm-svn: 81820
* Add test case from <rdar://problem/7184450>.Ted Kremenek2009-09-011-0/+69
| | | | llvm-svn: 80700
* retain/release checker: Treat NSObject method '-awakeAfterUsingCoder:'Ted Kremenek2009-08-201-6/+26
| | | | | | just as if it behaved like an init function. This fixes <rdar://problem/7129086>. llvm-svn: 79515
* retain/release checker: Special case handling of CFAttributedStringSetAttribute,Ted Kremenek2009-08-201-29/+93
| | | | | | | fixing <rdar://problem/7152619>. Along the way, merge test cases in 'test/Analysis/rdar-6539791.c' into 'test/Analysis/retain-release.m'. llvm-svn: 79499
* Remove 'StoreManager::OldCastRegion()', TypedViewRegion (which onlyTed Kremenek2009-07-291-1/+0
| | | | | | | OldCastRegion used), and the associated command line option '-analyzer-store=old-basic-cast'. llvm-svn: 77509
* Add test case for PR 4596, which is already fixed due to Steve Naroff's ↵Ted Kremenek2009-07-211-0/+3
| | | | | | overhaul of the Objective-C type system, but isn't in a checker build yet. llvm-svn: 76648
* Prep for new warning.Mike Stump2009-07-211-0/+1
| | | | llvm-svn: 76619
* Update test case to use '__has_feature' macro.Ted Kremenek2009-07-171-10/+17
| | | | llvm-svn: 76129
* Add basic checking for passing NULL to CFRetain/CFRelease, since those functionsTed Kremenek2009-07-141-0/+12
| | | | | | | are not explicitly marked as not accepting NULL pointers. This check illustrates how we need more refactoring in the custom-check logic. llvm-svn: 75570
* Switch BasicStoreManager to use the new CastRegion implementation by default,Ted Kremenek2009-07-101-1/+1
| | | | | | | | and replace the 'clang-cc' option '-analyzer-store=basic-new-cast' with '-analyzer-store=basic-old-cast'. We'll keep the old CastRegion implementation around for a little while for regression testing. llvm-svn: 75209
* Make 'BasicStoreManager' + 'NewCastRegion' testable from the command line ↵Ted Kremenek2009-07-061-1/+2
| | | | | | using '-analyzer-store=basic-new-cast'. llvm-svn: 74865
* Fix <rdar://problem/7033733>. The CF_RETURNS_RETAINED attribute should work ↵Ted Kremenek2009-07-061-0/+12
| | | | | | if the return type on an Objective-C method is a CF type reference, not just an Objective-C object reference. llvm-svn: 74841
* Add IOKit test cases for retain/release checker.Ted Kremenek2009-06-161-26/+134
| | | | llvm-svn: 73549
* Enhance attribute cf_returns_retained to also work (in the analyzer)Ted Kremenek2009-06-051-1/+27
| | | | | | | for non-Objctive-C pointer types. This implicitly documents that the return type is a CF object reference. llvm-svn: 72968
* Add special cases to retain checker for 'create' methods in QCView, ↵Ted Kremenek2009-05-201-47/+68
| | | | | | | | | | QCRenderer, and CIContext (Apple APIs). This fixes: <rdar://problem/6902710> clang: false positives w/QC and CoreImage methods. llvm-svn: 72187
OpenPOWER on IntegriCloud