summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/retain-release.m
Commit message (Collapse)AuthorAgeFilesLines
...
* Temporarily disable FileCheck part of this test.Ted Kremenek2012-09-101-2/+2
| | | | llvm-svn: 163515
* Revert "Revert Ted's r163489 and r163490, due to breakage."Ted Kremenek2012-09-101-2777/+2776
| | | | | | | | | I need to see how this breaks on other platforms when I fix the issue that Benjamin Kramer pointed out. This includes r163489 and r163490, plus a two line change. llvm-svn: 163512
* Revert Ted's r163489 and r163490, due to breakage.NAKAMURA Takumi2012-09-101-2776/+2777
| | | | | | | r163489, "Take another crack at stabilizing the emission order of analyzer" r163490, "Use isBeforeInTranslationUnitThan() instead of operator<." llvm-svn: 163497
* Take another crack at stabilizing the emission order of analyzerTed Kremenek2012-09-101-2777/+2776
| | | | | | | | | | | | | | diagnostics without using FoldingSetNodeIDs. This is done by doing a complete recursive comparison of the PathDiagnostics. Note that the previous method of comparing FoldingSetNodeIDs did not end up relying on unstable things such as pointer addresses, so I suspect this may still have some issues on various buildbots because I'm not sure if the true source of non-determinism has been eliminated. The tests pass for me, so the only way to know is to commit this change and see what happens. llvm-svn: 163489
* Try disabling the FileCheck part of the retain-release.m test to see if it ↵Ted Kremenek2012-09-081-2/+4
| | | | | | fixes the buildbots. llvm-svn: 163462
* Fix bug in BugReporter::RemoveUneededCalls() where "prunable"Ted Kremenek2012-09-081-0/+667
| | | | | | | PathDiagnosticEventPieces were *always* pruned. Instead, they are suppose to only be pruned if the entire call gets pruned. llvm-svn: 163460
* Attempt (again) to stabilize the order of the emission of diagnosticsTed Kremenek2012-09-081-2/+22080
| | | | | | | of the analyzer by using the FullProfile() of a PathDiagnostic for ordering them. llvm-svn: 163455
* Revert "Add plist output for retain-release.m in addition to -verify checking."Ted Kremenek2012-09-081-21887/+2
| | | | llvm-svn: 163447
* Revert "Attempt to make the PathDiagnostic emission order more deterministic by"Ted Kremenek2012-09-081-57/+57
| | | | llvm-svn: 163446
* Attempt to make the PathDiagnostic emission order more deterministic byTed Kremenek2012-09-071-57/+57
| | | | | | looking at PathPieces. llvm-svn: 163427
* Add plist output for retain-release.m in addition to -verify checking.Ted Kremenek2012-09-071-2/+21887
| | | | llvm-svn: 163418
* Revert "Rework the retain-release.m test to use FileCheck and the "text" output"Ted Kremenek2012-09-071-1348/+180
| | | | | | Apparently the output of this test is not deterministic. Needs investigation. llvm-svn: 163377
* Rework the retain-release.m test to use FileCheck and the "text" outputTed Kremenek2012-09-071-180/+1348
| | | | | | | | | | of the analyzer, as the RetainReleaseChecker has many fine-grain path diagnostic events that were not being checked. This uncovered an inconsistency between the path diagnostics between Objective-C and Objective-C++ code in ConditionBRVisitor that was fixed in a recent patch. llvm-svn: 163373
* Teach RetainCountChecker that CFPlugInInstanceCreate does notTed Kremenek2012-09-061-0/+12
| | | | | | | | return a CF object at all. Fixes <rdar://problem/9566345> llvm-svn: 163362
* Refine diagnostics for leaks reported when returning an objectTed Kremenek2012-09-061-0/+9
| | | | | | | | via function/method with [CF,NS]_RETURNS_NOT_RETAINED. Fixes <rdar://problem/11379000>. llvm-svn: 163355
* [analyzer] Make analyzer-ipa=dynamic-bifurcate the default.Anna Zaks2012-08-301-2/+2
| | | | | | | There are two tests regressions that come from the fact that the Retain Count checker does not cancel out inlining of ObjC methods. llvm-svn: 162950
* Teach RetainCountChecker about 'pragma clang arc_cf_code_audited'.Ted Kremenek2012-08-301-0/+13
| | | | llvm-svn: 162934
* [analyzer] More tests for "release and stop tracking".Jordan Rose2012-08-201-1/+17
| | | | | | | | Under GC, a release message is ignored, so "release and stop tracking" just becomes "stop tracking". But CFRelease is still honored. This is the main difference between ns_consumed and cf_consumed. llvm-svn: 162234
* [analyzer] Add a test for "release and stop tracking" behavior.Jordan Rose2012-08-201-0/+14
| | | | | | | | | This is used to handle functions and methods that consume an argument (annotated with the ns_consumed or cf_consumed attribute), but then the argument's retain count may be further modified in a callback. We want to warn about over-releasing, but we can't really track the object afterwards. llvm-svn: 162221
* [analyzer] Add a test case for OS X 10.8's NSMakeCollectable under non-GC.Jordan Rose2012-08-071-0/+13
| | | | | | | This is an additional test for r161349 (ignoring 10.8's annotations for NSMakeCollectable). llvm-svn: 161380
* Add a warning about almost-Doxygen trailing comments: //< and /*< ... */Dmitri Gribenko2012-06-221-1/+1
| | | | llvm-svn: 159001
* static analyzer: add inlining support for directly called blocks.Ted Kremenek2012-06-011-2/+1
| | | | llvm-svn: 157833
* -Wdeprecated warning to include reference (as a note)Fariborz Jahanian2012-05-271-1/+1
| | | | | | to the declaration in this patch. // rdar://10893232 llvm-svn: 157537
* [analyzer] RetainCountChecker: track ObjC boxed expression objects.Jordy Rose2012-05-121-2/+19
| | | | llvm-svn: 156699
* [analyzer] Allow pointers to escape through selector callbacks.Anna Zaks2012-05-091-1/+29
| | | | llvm-svn: 156481
* Teach the static analyzer that NSLog() and friends do not hold on to object ↵Ted Kremenek2012-05-081-0/+14
| | | | | | references (thus extending their lifetime). llvm-svn: 156346
* [analyzer] RetainCountChecker: Allow objects to escape through callbacksAnna Zaks2012-05-041-0/+26
| | | | | | Fixes radar://10973977. llvm-svn: 156215
* [analyzer] RetainRelease: Self assignment should not suppress a leakAnna Zaks2012-05-021-0/+5
| | | | | | warning. llvm-svn: 155966
* Teach RetainCountChecker that it doesn't quite understand ↵Ted Kremenek2012-04-261-0/+14
| | | | | | pthread_setspecific and it should just give up when it sees it. Fixes <rdar://problem/11282706>. llvm-svn: 155613
* Added a new attribute, objc_root_class, which informs the compiler when a ↵Patrick Beard2012-04-061-2/+2
| | | | | | | | | root class is intentionally declared. The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698> llvm-svn: 154187
* Change RetainCountChecker to eagerly "escape" retained objects when they areTed Kremenek2012-03-271-0/+23
| | | | | | | | | | | | assigned to a struct. This is fallout from inlining results, which expose far more patterns where people stuff CF objects into structs and pass them around (and we can reason about it). The problem is that we don't have a general way to detect when values have escaped, so as an intermediate step we need to eagerly prune out such tracking. Fixes <rdar://problem/11104566>. llvm-svn: 153489
* Teach RetainCountChecker about mixing method families with explicit ↵Ted Kremenek2012-03-091-0/+20
| | | | | | annotations. Fixes <rdar://problem/10824732>. llvm-svn: 152448
* Add static analyzer support for new NSArray/NSDictionary/NSNumber literals.Ted Kremenek2012-03-061-8/+75
| | | | llvm-svn: 152139
* [analyzer] Retain release: drop the line number info from the leakAnna Zaks2012-02-281-1/+1
| | | | | | message. llvm-svn: 151657
* Teach analyzer about NSAutoreleasePool -allocWithZone:. Fixes ↵Ted Kremenek2012-02-181-1/+10
| | | | | | <rdar://problem/10640253>. llvm-svn: 150892
* Teach the static analyzer to not treat XPC types as CF types.Ted Kremenek2012-01-041-0/+16
| | | | llvm-svn: 147506
* Fix major regression in RetainCountChecker. DefaultSummaries were not being ↵Ted Kremenek2011-10-051-1/+34
| | | | | | used when they were meant to be. Fixes <rdar://problem/10241614>. llvm-svn: 141250
* [analyzer] Fix a bug where PathDiagnosticLocation did not generate a valid ↵Anna Zaks2011-09-211-1/+7
| | | | | | | | range and add asserts to check validity of locations early on. Ignore invalid ranges in PathDiagnosticPiece (they could be added by checker writers). Addresses radar://10124836 and radar://radar10102244. llvm-svn: 140218
* [analyzer] Move the knowledge of whether or not GC is enabled for the ↵Jordy Rose2011-09-021-2/+2
| | | | | | | | | | current analysis from CFRefCount to ExprEngine. Remove TransferFuncs from ExprEngine and AnalysisConsumer. Demote RetainReleaseChecker to a regular checker, and give it the name osx.cocoa.RetainCount (class name change coming shortly). Update tests accordingly. llvm-svn: 138998
* Really remove FlatStoreManager and BasicStoreManager, this time from the ↵Ted Kremenek2011-07-281-2/+13
| | | | | | driver. Also remove associated tests. Sorry for the messy commits; this is the result of a botched Git merge. llvm-svn: 136422
* [analyzer] Overhaul how the static analyzer expects CFGs by forcing CFGs to ↵Ted Kremenek2011-07-281-1/+1
| | | | | | | | | | | | be linearized only when used by the static analyzer. This required a rewrite of LiveVariables, and exposed a ton of subtle bugs. The motivation of this large change is to drastically simplify the logic in ExprEngine going forward. Some fallout is that the output of some BugReporterVisitors is not as accurate as before; those will need to be fixed over time. There is also some possible performance regression as RemoveDeadBindings will be called frequently; this can also be improved over time. llvm-svn: 136419
* In Objective-C, pull arbitrary attributes from overriddenJohn McCall2011-07-221-0/+14
| | | | | | | | | | | | | | | methods, including indirectly overridden methods like those declared in protocols and categories. There are mismatches that we would like to diagnose but aren't yet, but this is fine for now. I looked at approaches that avoided doing this lookup unless we needed it, but the infer-related-result-type checks were doing it anyway, so I left it with the same fast-path check for no previous declartions of that selector. llvm-svn: 135743
* [analyzer] Per discussions with the Cocoa team, extend CF naming conventions ↵Ted Kremenek2011-07-161-0/+53
| | | | | | to extend to camel case functions instead of just title case functions. Fixes <rdar://problem/9732321>. llvm-svn: 135350
* Update retain-release.m to match updated warnings from r135310Jordy Rose2011-07-151-3/+3
| | | | llvm-svn: 135317
* Teach the static analyzer's interpretation of Cocoa conventions toDouglas Gregor2011-07-061-0/+25
| | | | | | | obey the objc_method_family attribute when provided. Fixes <rdar://problem/9726279>. llvm-svn: 134493
* Eliminate the -f[no]objc-infer-related-result-type flags; there's noDouglas Gregor2011-06-131-1/+2
| | | | | | reason to allow the user to control these semantics through a flag. llvm-svn: 132919
* Enhance retain/release checker to flag warnings when functions returning CG ↵Ted Kremenek2011-05-251-3/+3
| | | | | | types do not follow the Core Foundation naming conventions. llvm-svn: 132048
* Augment retain/release checker to not warn about tracked objects passed as ↵Ted Kremenek2011-05-021-2/+2
| | | | | | 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
* Adjust test/Analysis/retain-release.m to also test the retain/release ↵Ted Kremenek2011-04-291-7/+8
| | | | | | checker in Objective-C++ mode. llvm-svn: 130559
* When updating the retain summary based on {cf,ns}_consumed attributes,John McCall2011-04-061-0/+7
| | | | | | | be sure to consume the argument index that actually had the attribute rather than always the first. rdar://problem/9234108 llvm-svn: 128998
OpenPOWER on IntegriCloud