Files
clang-p2996/compiler-rt/lib/asan/lit_tests/TestCases/lsan_annotations.cc
Alexey Samsonov 43937b3758 Add cmake rules for building LSan common on Mac OS
llvm-svn: 184639
2013-06-22 16:33:52 +00:00

17 lines
331 B
C++

// Check that LSan annotations work fine.
// RUN: %clangxx_asan -O0 %s -o %t && %t
// RUN: %clangxx_asan -O3 %s -o %t && %t
#include <sanitizer/lsan_interface.h>
#include <stdlib.h>
int main() {
int *x = new int;
__lsan_ignore_object(x);
{
__lsan::ScopedDisabler disabler;
double *y = new double;
}
return 0;
}