summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authordmauro <dmauro@google.com>2020-09-29 19:27:38 (GMT)
committerAndy Getz <durandal@google.com>2020-09-30 00:48:11 (GMT)
commit477998eefac3d55831e7f3974671ba22b8739b93 (patch)
tree990f9e466ff02265bdf823def2cd967bd799b760 /googletest
parent2ff8d94d0ecb2fd69e6173b94324fbad4db43123 (diff)
downloadgoogletest-477998eefac3d55831e7f3974671ba22b8739b93.zip
googletest-477998eefac3d55831e7f3974671ba22b8739b93.tar.gz
googletest-477998eefac3d55831e7f3974671ba22b8739b93.tar.bz2
Googletest export
Fix undefined pointer comparison PiperOrigin-RevId: 334436975
Diffstat (limited to 'googletest')
-rw-r--r--googletest/src/gtest-death-test.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc
index 0764f2e..9c54b81 100644
--- a/googletest/src/gtest-death-test.cc
+++ b/googletest/src/gtest-death-test.cc
@@ -32,6 +32,7 @@
#include "gtest/gtest-death-test.h"
+#include <functional>
#include <utility>
#include "gtest/internal/gtest-port.h"
@@ -1282,7 +1283,7 @@ GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
static void StackLowerThanAddress(const void* ptr, bool* result) {
int dummy = 0;
- *result = (&dummy < ptr);
+ *result = std::less<const void*>()(&dummy, ptr);
}
// Make sure AddressSanitizer does not tamper with the stack here.