1 // Test for ScopedDisabler.
2 // RUN: %clangxx_lsan %s -o %t
3 // RUN: %env_lsan_opts=report_objects=1:use_registers=0:use_stacks=0 not %run %t 2>&1 | FileCheck %s
8 #include "sanitizer/lsan_interface.h"
13 __lsan::ScopedDisabler d
;
15 fprintf(stderr
, "Test alloc p: %p.\n", p
);
18 void *q
= malloc(1337);
19 fprintf(stderr
, "Test alloc q: %p.\n", q
);
23 // CHECK: Test alloc p: [[ADDR:.*]].
24 // CHECK-NOT: [[ADDR]]