From 022d52c97955a7c499435c3a9e03a3c74b7ebc29 Mon Sep 17 00:00:00 2001 From: "kosak@google.com" Date: Tue, 3 Dec 2013 22:38:22 +0000 Subject: Add MemorySanitizer annotations in gtest printers. Also remove unused variable kPathSeparatorString. git-svn-id: http://googletest.googlecode.com/svn/trunk@669 861a406c-534a-0410-8894-cb66d6ee9925 --- include/gtest/internal/gtest-port.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/gtest/internal/gtest-port.h') 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; -- cgit v1.2.3