[analyzer] Add test case from PR10794 for using 'new' with Obj-C objects.

llvm-svn: 152975
This commit is contained in:
Jordy Rose 2012-03-17 03:53:59 +00:00
parent be55f383f0
commit 914e81ad94
1 changed files with 6 additions and 0 deletions

View File

@ -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();