diff options
-rw-r--r-- | test/Analysis/retain-release.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Analysis/retain-release.mm b/test/Analysis/retain-release.mm index bae8dc3392..8c707acfc3 100644 --- a/test/Analysis/retain-release.mm +++ b/test/Analysis/retain-release.mm @@ -304,6 +304,12 @@ void test_smartpointer_3() { foo.noAdopt(x); } +void test_smartpointer_4() { + id x = [[NSObject alloc] init]; // no-warning + SmartPointer *foo = new SmartPointer(x); + delete foo; +} + extern CFStringRef ElectronMicroscopyEngage(void); void test_microscopy() { NSString *token = (NSString*) ElectronMicroscopyEngage(); |