[Flang][OpenMP]Add parsing support for DISPATCH construct (#121982)
[llvm-project.git] / compiler-rt / test / lsan / TestCases / ignore_object_errors.cpp
blob00f18bb49b95bd733c7a3bcd2d54cf86a31d3a3c
1 // Test for incorrect use of __lsan_ignore_object().
2 // RUN: %clangxx_lsan %s -o %t
3 // RUN: %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 = malloc(1337);
12 fprintf(stderr, "Test alloc: %p.\n", p);
13 __lsan_ignore_object(p);
14 __lsan_ignore_object(p);
15 free(p);
16 __lsan_ignore_object(p);
17 return 0;
19 // CHECK: Test alloc: [[ADDR:.*]].
20 // CHECK-NOT: SUMMARY: {{.*}} leaked