diff options
author | kosak <kosak@google.com> | 2013-12-03 22:38:22 (GMT) |
---|---|---|
committer | kosak <kosak@google.com> | 2013-12-03 22:38:22 (GMT) |
commit | 37b97d1c93fb8283f8bbf54f5618c1c1e5a4726a (patch) | |
tree | 0949bd9f08f265d8b29d513095775a69964dee0e /include | |
parent | aa34ae250800af7e98499abba44636503cf99b16 (diff) | |
download | googletest-37b97d1c93fb8283f8bbf54f5618c1c1e5a4726a.zip googletest-37b97d1c93fb8283f8bbf54f5618c1c1e5a4726a.tar.gz googletest-37b97d1c93fb8283f8bbf54f5618c1c1e5a4726a.tar.bz2 |
Add MemorySanitizer annotations in gtest printers. Also remove unused variable kPathSeparatorString.
Diffstat (limited to 'include')
-rw-r--r-- | include/gtest/internal/gtest-port.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index dc4fe0c..a6726b4 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -782,6 +782,19 @@ using ::std::tuple_size; # define GTEST_HAS_CXXABI_H_ 0 #endif +// A function level attribute to disable checking for use of uninitialized +// memory when built with MemorySanitizer. +#if defined(__clang__) +# if __has_feature(memory_sanitizer) +# define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ \ + __attribute__((no_sanitize_memory)) +# else +# define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ +# endif +#else +# define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ +#endif + namespace testing { class Message; |