diff options
author | kosak <kosak@google.com> | 2014-03-12 22:55:56 +0000 |
---|---|---|
committer | kosak <kosak@google.com> | 2014-03-12 22:55:56 +0000 |
commit | ffea2d604031a8c732cec8f8de9d9f9bcfbbcf70 (patch) | |
tree | 173f1b2d67378e24a82d2df3d7a0a2bab447c7dc /include/gtest/internal/gtest-port.h | |
parent | c82282819c0f6fbd2bd025f2326f0a6b104c59b9 (diff) | |
download | googletest-ffea2d604031a8c732cec8f8de9d9f9bcfbbcf70.tar.gz googletest-ffea2d604031a8c732cec8f8de9d9f9bcfbbcf70.tar.bz2 googletest-ffea2d604031a8c732cec8f8de9d9f9bcfbbcf70.zip |
Add annotations to suppress ThreadSanitizer failures due to gunit/gmock printer.
Diffstat (limited to 'include/gtest/internal/gtest-port.h')
-rw-r--r-- | include/gtest/internal/gtest-port.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index a1176760..eaf1a385 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -926,6 +926,18 @@ using ::std::tuple_size; # define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ #endif // __clang__ +// A function level attribute to disable ThreadSanitizer instrumentation. +#if defined(__clang__) +# if __has_feature(thread_sanitizer) +# define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ \ + __attribute__((no_sanitize_thread)) +# else +# define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ +# endif // __has_feature(thread_sanitizer) +#else +# define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ +#endif // __clang__ + namespace testing { class Message; |