aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Common/MemorySanitizer.h
blob: d1b8fd07f3301996029d5e45502722ac576d3b9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include <base/defines.h>

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-id-macro"
#endif

#undef __msan_unpoison
#undef __msan_test_shadow
#undef __msan_print_shadow
#undef __msan_unpoison_string

#define __msan_unpoison(X, Y) /// NOLINT
#define __msan_test_shadow(X, Y) (false) /// NOLINT
#define __msan_print_shadow(X, Y) /// NOLINT
#define __msan_unpoison_string(X) /// NOLINT

#if defined(ch_has_feature)
#    if ch_has_feature(memory_sanitizer)
#        undef __msan_unpoison
#        undef __msan_test_shadow
#        undef __msan_print_shadow
#        undef __msan_unpoison_string
#        include <sanitizer/msan_interface.h>
#    endif
#endif

#ifdef __clang__
#pragma clang diagnostic pop
#endif