diff --git a/src/google/protobuf/extension_set_unittest.cc b/src/google/protobuf/extension_set_unittest.cc index 511938ae445b0..f49ea9e2154b7 100644 --- a/src/google/protobuf/extension_set_unittest.cc +++ b/src/google/protobuf/extension_set_unittest.cc @@ -52,7 +52,6 @@ extern bool fully_verify_message_sets_opt_out; namespace { -using ::google::protobuf::internal::DownCast; using TestUtil::EqualsToSerialized; // This test closely mirrors google/protobuf/compiler/cpp/unittest.cc diff --git a/src/google/protobuf/map_test.inc b/src/google/protobuf/map_test.inc index ac0e766e3416c..af699eda35343 100644 --- a/src/google/protobuf/map_test.inc +++ b/src/google/protobuf/map_test.inc @@ -217,7 +217,6 @@ struct MapTestPeer { }; namespace { -using internal::DownCast; // Map API Test ===================================================== diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h index f135a35c26215..96a30911054b3 100644 --- a/src/google/protobuf/message_lite.h +++ b/src/google/protobuf/message_lite.h @@ -1200,11 +1200,6 @@ T* OnShutdownDelete(T* p) { return p; } -inline void AssertDownCast(const MessageLite& from, const MessageLite& to) { - ABSL_DCHECK(TypeId::Get(from) == TypeId::Get(to)) - << "Cannot downcast " << from.GetTypeName() << " to " << to.GetTypeName(); -} - template PROTOBUF_ALWAYS_INLINE MessageLite* MessageCreator::PlacementNew( const MessageLite* prototype_for_func, diff --git a/src/google/protobuf/repeated_field_reflection_unittest.inc b/src/google/protobuf/repeated_field_reflection_unittest.inc index da4136fff9ed9..cb9b09c90a4a3 100644 --- a/src/google/protobuf/repeated_field_reflection_unittest.inc +++ b/src/google/protobuf/repeated_field_reflection_unittest.inc @@ -22,7 +22,6 @@ namespace protobuf { namespace { -using internal::DownCast; using UNITTEST::ForeignMessage; using UNITTEST::TestAllExtensions; using UNITTEST::TestAllTypes;