Automated rollback of commit bf0d8e2384.

PiperOrigin-RevId: 513889737
pull/12140/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent e83848f092
commit 797b470fe8
  1. 14
      src/google/protobuf/descriptor.cc

@ -3740,10 +3740,10 @@ class DescriptorBuilder {
// Maximum recursion depth corresponds to 32 nested message declarations.
int recursion_depth_ = 32;
void AddError(absl::string_view element_name, const Message& descriptor,
void AddError(const std::string& element_name, const Message& descriptor,
DescriptorPool::ErrorCollector::ErrorLocation location,
absl::string_view error);
void AddError(absl::string_view element_name, const Message& descriptor,
const std::string& error);
void AddError(const std::string& element_name, const Message& descriptor,
DescriptorPool::ErrorCollector::ErrorLocation location,
const char* error);
void AddRecursiveImportError(const FileDescriptorProto& proto, int from_here);
@ -3937,7 +3937,6 @@ class DescriptorBuilder {
void SuggestFieldNumbers(FileDescriptor* file,
const FileDescriptorProto& proto);
// Must be run only after cross-linking.
void InterpretOptions();
@ -4190,9 +4189,9 @@ DescriptorBuilder::DescriptorBuilder(
DescriptorBuilder::~DescriptorBuilder() {}
PROTOBUF_NOINLINE void DescriptorBuilder::AddError(
absl::string_view element_name, const Message& descriptor,
const std::string& element_name, const Message& descriptor,
DescriptorPool::ErrorCollector::ErrorLocation location,
absl::string_view error) {
const std::string& error) {
if (error_collector_ == nullptr) {
if (!had_errors_) {
ABSL_LOG(ERROR) << "Invalid proto descriptor for file \"" << filename_
@ -4207,7 +4206,7 @@ PROTOBUF_NOINLINE void DescriptorBuilder::AddError(
}
PROTOBUF_NOINLINE void DescriptorBuilder::AddError(
absl::string_view element_name, const Message& descriptor,
const std::string& element_name, const Message& descriptor,
DescriptorPool::ErrorCollector::ErrorLocation location, const char* error) {
AddError(element_name, descriptor, location, std::string(error));
}
@ -6463,7 +6462,6 @@ void DescriptorBuilder::CrossLinkExtensionRange(
}
void DescriptorBuilder::CrossLinkField(FieldDescriptor* field,
const FieldDescriptorProto& proto) {
if (field->options_ == nullptr) {

Loading…
Cancel
Save