mirror of
https://github.com/google/googletest.git
synced 2025-03-19 10:23:48 +00:00
Googletest export
Fix undefined pointer comparison PiperOrigin-RevId: 334436975
This commit is contained in:
parent
2ff8d94d0e
commit
477998eefa
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include "gtest/gtest-death-test.h"
|
#include "gtest/gtest-death-test.h"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "gtest/internal/gtest-port.h"
|
#include "gtest/internal/gtest-port.h"
|
||||||
@ -1282,7 +1283,7 @@ GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
|
|||||||
GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
|
GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
|
||||||
static void StackLowerThanAddress(const void* ptr, bool* result) {
|
static void StackLowerThanAddress(const void* ptr, bool* result) {
|
||||||
int dummy = 0;
|
int dummy = 0;
|
||||||
*result = (&dummy < ptr);
|
*result = std::less<const void*>()(&dummy, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure AddressSanitizer does not tamper with the stack here.
|
// Make sure AddressSanitizer does not tamper with the stack here.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user