1 // RUN: %clang_asan %s -o %t -framework Foundation
2 // RUN: %run %t 2>&1 | FileCheck %s
4 #import <Foundation/Foundation.h>
10 @interface MyClass: NSObject
11 - (MyStruct)methodWhichReturnsARect;
13 @implementation MyClass
14 - (MyStruct)methodWhichReturnsARect {
25 MyClass *myNil = nil; // intentionally nil
26 [myNil methodWhichReturnsARect];
27 fprintf(stderr, "Hello world");
30 // CHECK-NOT: AddressSanitizer: stack-use-after-scope