userver
C++ Async Framework
Loading...
Searching...
No Matches
lsan.hpp
1
#
pragma
once
2
3
#
if
defined
(
__has_feature
)
4
5
#
if
__has_feature
(
leak_sanitizer
)
||
__has_feature
(
address_sanitizer
)
6
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
7
#
define
USERVER_IMPL_HAS_LSAN
1
8
#
else
9
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
10
#
define
USERVER_IMPL_HAS_LSAN
0
11
#
endif
12
13
#
else
14
15
#
if
defined
(
__SANITIZE_ADDRESS__
)
||
defined
(
__SANITIZE_LEAK__
)
16
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
17
#
define
USERVER_IMPL_HAS_LSAN
1
18
#
else
19
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
20
#
define
USERVER_IMPL_HAS_LSAN
0
21
#
endif
22
23
#
endif
24
25
#
if
USERVER_IMPL_HAS_LSAN
26
#
include
<
sanitizer
/
lsan_interface
.
h
>
27
#
endif
28
29
USERVER_NAMESPACE_BEGIN
30
31
namespace
compiler
::impl {
32
33
template
<
typename
T>
34
void
LsanIgnoreObject([[maybe_unused]]
const
T* object) {
35
#
if
USERVER_IMPL_HAS_LSAN
36
__lsan_ignore_object(object);
37
#
endif
38
}
39
40
}
// namespace compiler::impl
41
42
USERVER_NAMESPACE_END
userver
compiler
impl
lsan.hpp
Generated on Wed May 15 2024 22:31:50 for userver by
Doxygen
1.10.0