• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Check that LSan annotations work fine.
2 // RUN: %clangxx_asan -O0 %s -o %t && %run %t
3 // RUN: %clangxx_asan -O3 %s -o %t && %run %t
4 
5 #include <sanitizer/lsan_interface.h>
6 #include <stdlib.h>
7 
main()8 int main() {
9   int *x = new int;
10   __lsan_ignore_object(x);
11   {
12     __lsan::ScopedDisabler disabler;
13     double *y = new double;
14   }
15   return 0;
16 }
17