Async++ unknown
Async (co_await/co_return) code for C++
Loading...
Searching...
No Matches
sanitizers.h
1#pragma once
2
3#ifndef ASYNCPP_HAS_ASAN
4#if defined(__has_feature)
5#if __has_feature(address_sanitizer)
6#define ASYNCPP_HAS_ASAN 1
7#endif
8#elif defined(__SANITIZE_ADDRESS__)
9#define ASYNCPP_HAS_ASAN 1
10#endif
11#endif
12#ifndef ASYNCPP_HAS_ASAN
13#define ASYNCPP_HAS_ASAN 0
14#endif
15#if ASYNCPP_HAS_ASAN
16#include <sanitizer/asan_interface.h>
17#endif
18
19#ifndef ASYNCPP_HAS_TSAN
20#if defined(__has_feature)
21#if __has_feature(thread_sanitizer)
22#define ASYNCPP_HAS_TSAN 1
23#endif
24#elif defined(__SANITIZE_THREAD__)
25#define ASYNCPP_HAS_TSAN 1
26#endif
27#endif
28#ifndef ASYNCPP_HAS_TSAN
29#define ASYNCPP_HAS_TSAN 0
30#endif
31#if ASYNCPP_HAS_TSAN
32#include <sanitizer/tsan_interface.h>
33#endif
34
35#ifndef ASYNCPP_HAS_VALGRIND
36#if __has_include(<valgrind/valgrind.h>)
37#define ASYNCPP_HAS_VALGRIND 1
38#else
39#define ASYNCPP_HAS_VALGRIND 0
40#endif
41#endif
42#if ASYNCPP_HAS_VALGRIND
43#include <valgrind/valgrind.h>
44#endif