Internal change to extensions.

PiperOrigin-RevId: 512684685
pull/12069/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent d97f0c2234
commit bf0d8e2384
  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(const std::string& element_name, const Message& descriptor,
void AddError(absl::string_view element_name, const Message& descriptor,
DescriptorPool::ErrorCollector::ErrorLocation location,
const std::string& error);
void AddError(const std::string& element_name, const Message& descriptor,
absl::string_view error);
void AddError(absl::string_view element_name, const Message& descriptor,
DescriptorPool::ErrorCollector::ErrorLocation location,
const char* error);
void AddRecursiveImportError(const FileDescriptorProto& proto, int from_here);
@ -3937,6 +3937,7 @@ class DescriptorBuilder {
void SuggestFieldNumbers(FileDescriptor* file,
const FileDescriptorProto& proto);
// Must be run only after cross-linking.
void InterpretOptions();
@ -4189,9 +4190,9 @@ DescriptorBuilder::DescriptorBuilder(
DescriptorBuilder::~DescriptorBuilder() {}
PROTOBUF_NOINLINE void DescriptorBuilder::AddError(
const std::string& element_name, const Message& descriptor,
absl::string_view element_name, const Message& descriptor,
DescriptorPool::ErrorCollector::ErrorLocation location,
const std::string& error) {
absl::string_view error) {
if (error_collector_ == nullptr) {
if (!had_errors_) {
ABSL_LOG(ERROR) << "Invalid proto descriptor for file \"" << filename_
@ -4206,7 +4207,7 @@ PROTOBUF_NOINLINE void DescriptorBuilder::AddError(
}
PROTOBUF_NOINLINE void DescriptorBuilder::AddError(
const std::string& element_name, const Message& descriptor,
absl::string_view element_name, const Message& descriptor,
DescriptorPool::ErrorCollector::ErrorLocation location, const char* error) {
AddError(element_name, descriptor, location, std::string(error));
}
@ -6462,6 +6463,7 @@ void DescriptorBuilder::CrossLinkExtensionRange(
}
void DescriptorBuilder::CrossLinkField(FieldDescriptor* field,
const FieldDescriptorProto& proto) {
if (field->options_ == nullptr) {

Loading…
Cancel
Save