blob: 158c2fdf9f481583208fc160d3d5249615bfc90a [file] [log] [blame]
// Check that LSan annotations work fine.
// RUN: %clangxx_asan -O0 %s -o %t && %run %t
// RUN: %clangxx_asan -O3 %s -o %t && %run %t
#include <sanitizer/lsan_interface.h>
#include <stdlib.h>
int *x, *y;
int main() {
x = new int;
__lsan_ignore_object(x);
{
__lsan::ScopedDisabler disabler;
y = new int;
}
x = y = nullptr;
return 0;
}