Commit 48235b89 by Derek Mauro Committed by Copybara-Service

Workaround symbol resolution bug in Clang 19

Clang 19 seems to see the old usage of
absl::string_internal::HasAbslStringify in GoogleTest 1.14.0 and
incorrectly resolves absl::HasAbslStringify sometimes. This issue is
fixed when a version of GoogleTest that removes
absl::string_internal::HasAbslStringify is used.

This workaround is ugly but will be removed after the next GoogleTest
release.

PiperOrigin-RevId: 636993564
Change-Id: Ic166edbd4ddc2c716afbedec34be629cfc988e00
parent 52bc669d
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <type_traits> #include <type_traits>
#include <utility> #include <utility>
#include "absl/base/config.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
namespace absl { namespace absl {
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
#include "absl/strings/has_absl_stringify.h" #include "absl/strings/has_absl_stringify.h"
#include <type_traits>
#include <utility>
#include "absl/base/config.h" #include "absl/base/config.h"
namespace absl { namespace absl {
...@@ -34,7 +37,14 @@ namespace strings_internal { ...@@ -34,7 +37,14 @@ namespace strings_internal {
// //
// https://github.com/google/googletest/pull/4368#issuecomment-1717699895 // https://github.com/google/googletest/pull/4368#issuecomment-1717699895
// https://github.com/google/googletest/pull/4368#issuecomment-1717699895 // https://github.com/google/googletest/pull/4368#issuecomment-1717699895
using ::absl::HasAbslStringify; template <typename T, typename = void>
struct HasAbslStringify : std::false_type {};
template <typename T>
struct HasAbslStringify<
T, std::enable_if_t<std::is_void<decltype(AbslStringify(
std::declval<strings_internal::UnimplementedSink&>(),
std::declval<const T&>()))>::value>> : std::true_type {};
} // namespace strings_internal } // namespace strings_internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment