brintos

brintos / llvm-project-archived public Read only

0
0
Text · 597 B · ce3182f Raw
19 lines · plain
1// Test that the memory region  that contains Objective-C block trampolines2// is scanned.3// FIXME: Find a way to reduce this without AppKit to remove Mac requirement.4// UNSUPPORTED: ios5// RUN: %clangxx_lsan %s  -o %t -framework Cocoa -fno-objc-arc6// RUN: %env_lsan_opts="report_objects=1" %run %t 2>&1  && echo "" | FileCheck %s7 8#import <Cocoa/Cocoa.h>9 10#include <sanitizer/lsan_interface.h>11 12int main() {13  NSView *view =14      [[[NSView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)] autorelease];15  __lsan_do_leak_check();16  return 0;17}18// CHECK-NOT: LeakSanitizer: detected memory leaks19