[cfe-commits] r152975 - /cfe/trunk/test/Analysis/retain-release.mm
Jordy Rose
jediknil at belkadan.com
Fri Mar 16 20:53:59 PDT 2012
Author: jrose
Date: Fri Mar 16 22:53:59 2012
New Revision: 152975
URL: http://llvm.org/viewvc/llvm-project?rev=152975&view=rev
Log:
[analyzer] Add test case from PR10794 for using 'new' with Obj-C objects.
Modified:
cfe/trunk/test/Analysis/retain-release.mm
Modified: cfe/trunk/test/Analysis/retain-release.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/retain-release.mm?rev=152975&r1=152974&r2=152975&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/retain-release.mm (original)
+++ cfe/trunk/test/Analysis/retain-release.mm Fri Mar 16 22:53:59 2012
@@ -304,6 +304,12 @@
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();
More information about the cfe-commits
mailing list