summaryrefslogtreecommitdiff
path: root/include/gtest/internal/gtest-port.h
diff options
context:
space:
mode:
authorkosak@google.com <kosak@google.com@861a406c-534a-0410-8894-cb66d6ee9925>2013-12-03 22:38:22 +0000
committerkosak@google.com <kosak@google.com@861a406c-534a-0410-8894-cb66d6ee9925>2013-12-03 22:38:22 +0000
commit022d52c97955a7c499435c3a9e03a3c74b7ebc29 (patch)
tree0949bd9f08f265d8b29d513095775a69964dee0e /include/gtest/internal/gtest-port.h
parentbc830d325d07a8a943386446139be3ab3565e038 (diff)
downloadgtest-022d52c97955a7c499435c3a9e03a3c74b7ebc29.tar.gz
gtest-022d52c97955a7c499435c3a9e03a3c74b7ebc29.tar.bz2
gtest-022d52c97955a7c499435c3a9e03a3c74b7ebc29.tar.xz
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
Diffstat (limited to 'include/gtest/internal/gtest-port.h')
-rw-r--r--include/gtest/internal/gtest-port.h13
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;