[Flang][OpenMP]Add parsing support for DISPATCH construct (#121982)
[llvm-project.git] / compiler-rt / test / lsan / TestCases / disabler.cpp
blobe3b18087de86d684c681ec624a167c8fa8dbf02c
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
5 #include <stdio.h>
6 #include <stdlib.h>
8 #include "sanitizer/lsan_interface.h"
10 int main() {
11 void **p;
13 __lsan::ScopedDisabler d;
14 p = new void *;
15 fprintf(stderr, "Test alloc p: %p.\n", p);
17 *p = malloc(666);
18 void *q = malloc(1337);
19 fprintf(stderr, "Test alloc q: %p.\n", q);
20 return 0;
23 // CHECK: Test alloc p: [[ADDR:.*]].
24 // CHECK-NOT: [[ADDR]]