xref: /llvm-project/compiler-rt/test/asan/TestCases/default_options.cpp (revision 53a81d4d26f0409de8a0655d7af90f2bea222a12)
1 // RUN: %clangxx_asan -O2 %s -o %t
2 // RUN: %run %t 2>&1 | FileCheck %s
3 
4 const char *kAsanDefaultOptions = "verbosity=1 help=1";
5 // Required for dyld macOS 12.0+
6 #if (__APPLE__)
7 __attribute__((weak))
8 #endif
9 __attribute__((no_sanitize_address))
10 extern "C" const char *
11 __asan_default_options() {
12   // CHECK: Available flags for AddressSanitizer:
13   return kAsanDefaultOptions;
14 }
15 
16 int main() {
17   return 0;
18 }
19