Lines Matching refs:proto
1562 void FileDescriptor::CopyTo(FileDescriptorProto* proto) const { in CopyTo()
1563 proto->set_name(name()); in CopyTo()
1564 if (!package().empty()) proto->set_package(package()); in CopyTo()
1567 proto->add_dependency(dependency(i)->name()); in CopyTo()
1571 proto->add_public_dependency(public_dependencies_[i]); in CopyTo()
1575 proto->add_weak_dependency(weak_dependencies_[i]); in CopyTo()
1579 message_type(i)->CopyTo(proto->add_message_type()); in CopyTo()
1582 enum_type(i)->CopyTo(proto->add_enum_type()); in CopyTo()
1585 service(i)->CopyTo(proto->add_service()); in CopyTo()
1588 extension(i)->CopyTo(proto->add_extension()); in CopyTo()
1592 proto->mutable_options()->CopyFrom(options()); in CopyTo()
1596 void FileDescriptor::CopySourceCodeInfoTo(FileDescriptorProto* proto) const { in CopySourceCodeInfoTo()
1598 proto->mutable_source_code_info()->CopyFrom(*source_code_info_); in CopySourceCodeInfoTo()
1602 void Descriptor::CopyTo(DescriptorProto* proto) const { in CopyTo()
1603 proto->set_name(name()); in CopyTo()
1606 field(i)->CopyTo(proto->add_field()); in CopyTo()
1609 oneof_decl(i)->CopyTo(proto->add_oneof_decl()); in CopyTo()
1612 nested_type(i)->CopyTo(proto->add_nested_type()); in CopyTo()
1615 enum_type(i)->CopyTo(proto->add_enum_type()); in CopyTo()
1618 DescriptorProto::ExtensionRange* range = proto->add_extension_range(); in CopyTo()
1623 extension(i)->CopyTo(proto->add_extension()); in CopyTo()
1627 proto->mutable_options()->CopyFrom(options()); in CopyTo()
1631 void FieldDescriptor::CopyTo(FieldDescriptorProto* proto) const { in CopyTo()
1632 proto->set_name(name()); in CopyTo()
1633 proto->set_number(number()); in CopyTo()
1637 proto->set_label(static_cast<FieldDescriptorProto::Label>( in CopyTo()
1639 proto->set_type(static_cast<FieldDescriptorProto::Type>( in CopyTo()
1644 proto->set_extendee("."); in CopyTo()
1646 proto->mutable_extendee()->append(containing_type()->full_name()); in CopyTo()
1653 proto->clear_type(); in CopyTo()
1657 proto->set_type_name("."); in CopyTo()
1659 proto->mutable_type_name()->append(message_type()->full_name()); in CopyTo()
1662 proto->set_type_name("."); in CopyTo()
1664 proto->mutable_type_name()->append(enum_type()->full_name()); in CopyTo()
1668 proto->set_default_value(DefaultValueAsString(false)); in CopyTo()
1672 proto->set_oneof_index(containing_oneof()->index()); in CopyTo()
1676 proto->mutable_options()->CopyFrom(options()); in CopyTo()
1680 void OneofDescriptor::CopyTo(OneofDescriptorProto* proto) const { in CopyTo()
1681 proto->set_name(name()); in CopyTo()
1684 void EnumDescriptor::CopyTo(EnumDescriptorProto* proto) const { in CopyTo()
1685 proto->set_name(name()); in CopyTo()
1688 value(i)->CopyTo(proto->add_value()); in CopyTo()
1692 proto->mutable_options()->CopyFrom(options()); in CopyTo()
1696 void EnumValueDescriptor::CopyTo(EnumValueDescriptorProto* proto) const { in CopyTo()
1697 proto->set_name(name()); in CopyTo()
1698 proto->set_number(number()); in CopyTo()
1701 proto->mutable_options()->CopyFrom(options()); in CopyTo()
1705 void ServiceDescriptor::CopyTo(ServiceDescriptorProto* proto) const { in CopyTo()
1706 proto->set_name(name()); in CopyTo()
1709 method(i)->CopyTo(proto->add_method()); in CopyTo()
1713 proto->mutable_options()->CopyFrom(options()); in CopyTo()
1717 void MethodDescriptor::CopyTo(MethodDescriptorProto* proto) const { in CopyTo()
1718 proto->set_name(name()); in CopyTo()
1721 proto->set_input_type("."); in CopyTo()
1723 proto->mutable_input_type()->append(input_type()->full_name()); in CopyTo()
1726 proto->set_output_type("."); in CopyTo()
1728 proto->mutable_output_type()->append(output_type()->full_name()); in CopyTo()
1731 proto->mutable_options()->CopyFrom(options()); in CopyTo()
2288 const FileDescriptor* BuildFile(const FileDescriptorProto& proto);
2335 void AddRecursiveImportError(const FileDescriptorProto& proto, int from_here);
2336 void AddTwiceListedError(const FileDescriptorProto& proto, int index);
2337 void AddImportError(const FileDescriptorProto& proto, int index);
2419 const Message& proto, Symbol symbol);
2426 void AddPackage(const string& name, const Message& proto,
2432 const Message& proto);
2465 void BuildMessage(const DescriptorProto& proto,
2468 void BuildFieldOrExtension(const FieldDescriptorProto& proto,
2472 void BuildField(const FieldDescriptorProto& proto, in BuildField() argument
2475 BuildFieldOrExtension(proto, parent, result, false); in BuildField()
2477 void BuildExtension(const FieldDescriptorProto& proto, in BuildExtension() argument
2480 BuildFieldOrExtension(proto, parent, result, true); in BuildExtension()
2482 void BuildExtensionRange(const DescriptorProto::ExtensionRange& proto,
2485 void BuildOneof(const OneofDescriptorProto& proto,
2488 void BuildEnum(const EnumDescriptorProto& proto,
2491 void BuildEnumValue(const EnumValueDescriptorProto& proto,
2494 void BuildService(const ServiceDescriptorProto& proto,
2497 void BuildMethod(const MethodDescriptorProto& proto,
2508 void CrossLinkFile(FileDescriptor* file, const FileDescriptorProto& proto);
2509 void CrossLinkMessage(Descriptor* message, const DescriptorProto& proto);
2511 const FieldDescriptorProto& proto);
2513 const EnumDescriptorProto& proto);
2515 const EnumValueDescriptorProto& proto);
2517 const ServiceDescriptorProto& proto);
2519 const MethodDescriptorProto& proto);
2657 const FileDescriptorProto& proto);
2659 const DescriptorProto& proto);
2661 const FieldDescriptorProto& proto);
2663 const EnumDescriptorProto& proto);
2665 const EnumValueDescriptorProto& proto);
2667 const ServiceDescriptorProto& proto);
2669 const MethodDescriptorProto& proto);
2672 const FieldDescriptorProto& proto);
2677 const FileDescriptorProto& proto) { in BuildFile() argument
2685 return DescriptorBuilder(this, tables_.get(), NULL).BuildFile(proto); in BuildFile()
2689 const FileDescriptorProto& proto, in BuildFileCollectingErrors() argument
2699 error_collector).BuildFile(proto); in BuildFileCollectingErrors()
2703 const FileDescriptorProto& proto) const { in BuildFileFromDatabase()
2705 if (tables_->known_bad_files_.count(proto.name()) > 0) { in BuildFileFromDatabase()
2710 default_error_collector_).BuildFile(proto); in BuildFileFromDatabase()
2712 tables_->known_bad_files_.insert(proto.name()); in BuildFileFromDatabase()
3089 const Message& proto, Symbol symbol) { in AddSymbol() argument
3107 AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, in AddSymbol()
3110 AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, in AddSymbol()
3117 AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, in AddSymbol()
3126 const string& name, const Message& proto, const FileDescriptor* file) { in AddPackage() argument
3132 ValidateSymbolName(name, name, proto); in AddPackage()
3136 AddPackage(*parent_name, proto, file); in AddPackage()
3137 ValidateSymbolName(name.substr(dot_pos + 1), name, proto); in AddPackage()
3144 AddError(name, proto, DescriptorPool::ErrorCollector::NAME, in AddPackage()
3153 const string& name, const string& full_name, const Message& proto) { in ValidateSymbolName() argument
3155 AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, in ValidateSymbolName()
3164 AddError(full_name, proto, DescriptorPool::ErrorCollector::NAME, in ValidateSymbolName()
3253 const FileDescriptorProto& proto, int from_here) { in AddRecursiveImportError() argument
3259 error_message.append(proto.name()); in AddRecursiveImportError()
3261 AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER, in AddRecursiveImportError()
3265 void DescriptorBuilder::AddTwiceListedError(const FileDescriptorProto& proto, in AddTwiceListedError() argument
3267 AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER, in AddTwiceListedError()
3268 "Import \"" + proto.dependency(index) + "\" was listed twice."); in AddTwiceListedError()
3271 void DescriptorBuilder::AddImportError(const FileDescriptorProto& proto, in AddImportError() argument
3275 message = "Import \"" + proto.dependency(index) + in AddImportError()
3278 message = "Import \"" + proto.dependency(index) + in AddImportError()
3281 AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER, message); in AddImportError()
3285 const FileDescriptorProto& proto) { in ExistingFileMatchesProto() argument
3288 return existing_proto.SerializeAsString() == proto.SerializeAsString(); in ExistingFileMatchesProto()
3292 const FileDescriptorProto& proto) { in BuildFile() argument
3293 filename_ = proto.name(); in BuildFile()
3303 if (ExistingFileMatchesProto(existing_file, proto)) { in BuildFile()
3321 if (tables_->pending_files_[i] == proto.name()) { in BuildFile()
3322 AddRecursiveImportError(proto, i); in BuildFile()
3331 tables_->pending_files_.push_back(proto.name()); in BuildFile()
3332 for (int i = 0; i < proto.dependency_size(); i++) { in BuildFile()
3333 if (tables_->FindFile(proto.dependency(i)) == NULL && in BuildFile()
3335 pool_->underlay_->FindFileByName(proto.dependency(i)) == NULL)) { in BuildFile()
3337 pool_->TryFindFileInFallbackDatabase(proto.dependency(i)); in BuildFile()
3350 if (proto.has_source_code_info()) { in BuildFile()
3352 info->CopyFrom(proto.source_code_info()); in BuildFile()
3361 if (!proto.has_name()) { in BuildFile()
3362 AddError("", proto, DescriptorPool::ErrorCollector::OTHER, in BuildFile()
3366 result->name_ = tables_->AllocateString(proto.name()); in BuildFile()
3367 if (proto.has_package()) { in BuildFile()
3368 result->package_ = tables_->AllocateString(proto.package()); in BuildFile()
3380 AddError(proto.name(), proto, DescriptorPool::ErrorCollector::OTHER, in BuildFile()
3388 AddPackage(result->package(), proto, result); in BuildFile()
3393 result->dependency_count_ = proto.dependency_size(); in BuildFile()
3395 tables_->AllocateArray<const FileDescriptor*>(proto.dependency_size()); in BuildFile()
3398 for (int i = 0; i < proto.weak_dependency_size(); ++i) { in BuildFile()
3399 weak_deps.insert(proto.weak_dependency(i)); in BuildFile()
3401 for (int i = 0; i < proto.dependency_size(); i++) { in BuildFile()
3402 if (!seen_dependencies.insert(proto.dependency(i)).second) { in BuildFile()
3403 AddTwiceListedError(proto, i); in BuildFile()
3406 const FileDescriptor* dependency = tables_->FindFile(proto.dependency(i)); in BuildFile()
3408 dependency = pool_->underlay_->FindFileByName(proto.dependency(i)); in BuildFile()
3414 dependency = NewPlaceholderFile(proto.dependency(i)); in BuildFile()
3416 AddImportError(proto, i); in BuildFile()
3422 (pool_->unused_import_track_files_.find(proto.name()) != in BuildFile()
3435 proto.public_dependency_size()); in BuildFile()
3436 for (int i = 0; i < proto.public_dependency_size(); i++) { in BuildFile()
3438 int index = proto.public_dependency(i); in BuildFile()
3439 if (index >= 0 && index < proto.dependency_size()) { in BuildFile()
3444 AddError(proto.name(), proto, in BuildFile()
3460 proto.weak_dependency_size()); in BuildFile()
3461 for (int i = 0; i < proto.weak_dependency_size(); i++) { in BuildFile()
3462 int index = proto.weak_dependency(i); in BuildFile()
3463 if (index >= 0 && index < proto.dependency_size()) { in BuildFile()
3466 AddError(proto.name(), proto, in BuildFile()
3474 BUILD_ARRAY(proto, result, message_type, BuildMessage , NULL); in BuildFile()
3475 BUILD_ARRAY(proto, result, enum_type , BuildEnum , NULL); in BuildFile()
3476 BUILD_ARRAY(proto, result, service , BuildService , NULL); in BuildFile()
3477 BUILD_ARRAY(proto, result, extension , BuildExtension, NULL); in BuildFile()
3480 if (!proto.has_options()) { in BuildFile()
3483 AllocateOptions(proto.options(), result); in BuildFile()
3489 CrossLinkFile(result, proto); in BuildFile()
3506 ValidateFileOptions(result, proto); in BuildFile()
3523 void DescriptorBuilder::BuildMessage(const DescriptorProto& proto, in BuildMessage() argument
3530 full_name->append(proto.name()); in BuildMessage()
3532 ValidateSymbolName(proto.name(), *full_name, proto); in BuildMessage()
3534 result->name_ = tables_->AllocateString(proto.name()); in BuildMessage()
3542 BUILD_ARRAY(proto, result, oneof_decl , BuildOneof , result); in BuildMessage()
3543 BUILD_ARRAY(proto, result, field , BuildField , result); in BuildMessage()
3544 BUILD_ARRAY(proto, result, nested_type , BuildMessage , result); in BuildMessage()
3545 BUILD_ARRAY(proto, result, enum_type , BuildEnum , result); in BuildMessage()
3546 BUILD_ARRAY(proto, result, extension_range, BuildExtensionRange, result); in BuildMessage()
3547 BUILD_ARRAY(proto, result, extension , BuildExtension , result); in BuildMessage()
3550 if (!proto.has_options()) { in BuildMessage()
3553 AllocateOptions(proto.options(), result); in BuildMessage()
3557 proto, Symbol(result)); in BuildMessage()
3565 AddError(field->full_name(), proto.extension_range(j), in BuildMessage()
3581 AddError(result->full_name(), proto.extension_range(j), in BuildMessage()
3592 void DescriptorBuilder::BuildFieldOrExtension(const FieldDescriptorProto& proto, in BuildFieldOrExtension() argument
3600 full_name->append(proto.name()); in BuildFieldOrExtension()
3602 ValidateSymbolName(proto.name(), *full_name, proto); in BuildFieldOrExtension()
3604 result->name_ = tables_->AllocateString(proto.name()); in BuildFieldOrExtension()
3607 result->number_ = proto.number(); in BuildFieldOrExtension()
3613 string lowercase_name(proto.name()); in BuildFieldOrExtension()
3615 if (lowercase_name == proto.name()) { in BuildFieldOrExtension()
3624 result->camelcase_name_ = tables_->AllocateString(ToCamelCase(proto.name())); in BuildFieldOrExtension()
3629 implicit_cast<int>(proto.type())); in BuildFieldOrExtension()
3631 implicit_cast<int>(proto.label())); in BuildFieldOrExtension()
3636 AddError(result->full_name(), proto, in BuildFieldOrExtension()
3653 result->has_default_value_ = proto.has_default_value(); in BuildFieldOrExtension()
3654 if (proto.has_default_value() && result->is_repeated()) { in BuildFieldOrExtension()
3655 AddError(result->full_name(), proto, in BuildFieldOrExtension()
3660 if (proto.has_type()) { in BuildFieldOrExtension()
3661 if (proto.has_default_value()) { in BuildFieldOrExtension()
3666 strtol(proto.default_value().c_str(), &end_pos, 0); in BuildFieldOrExtension()
3670 strto64(proto.default_value().c_str(), &end_pos, 0); in BuildFieldOrExtension()
3674 strtoul(proto.default_value().c_str(), &end_pos, 0); in BuildFieldOrExtension()
3678 strtou64(proto.default_value().c_str(), &end_pos, 0); in BuildFieldOrExtension()
3681 if (proto.default_value() == "inf") { in BuildFieldOrExtension()
3683 } else if (proto.default_value() == "-inf") { in BuildFieldOrExtension()
3685 } else if (proto.default_value() == "nan") { in BuildFieldOrExtension()
3689 io::NoLocaleStrtod(proto.default_value().c_str(), &end_pos); in BuildFieldOrExtension()
3693 if (proto.default_value() == "inf") { in BuildFieldOrExtension()
3695 } else if (proto.default_value() == "-inf") { in BuildFieldOrExtension()
3697 } else if (proto.default_value() == "nan") { in BuildFieldOrExtension()
3701 io::NoLocaleStrtod(proto.default_value().c_str(), &end_pos); in BuildFieldOrExtension()
3705 if (proto.default_value() == "true") { in BuildFieldOrExtension()
3707 } else if (proto.default_value() == "false") { in BuildFieldOrExtension()
3710 AddError(result->full_name(), proto, in BuildFieldOrExtension()
3722 UnescapeCEscapeString(proto.default_value())); in BuildFieldOrExtension()
3725 tables_->AllocateString(proto.default_value()); in BuildFieldOrExtension()
3729 AddError(result->full_name(), proto, in BuildFieldOrExtension()
3740 if (proto.default_value().empty() || *end_pos != '\0') { in BuildFieldOrExtension()
3741 AddError(result->full_name(), proto, in BuildFieldOrExtension()
3743 "Couldn't parse default value \"" + proto.default_value() + in BuildFieldOrExtension()
3785 AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, in BuildFieldOrExtension()
3796 AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, in BuildFieldOrExtension()
3801 AddError(result->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, in BuildFieldOrExtension()
3810 if (!proto.has_extendee()) { in BuildFieldOrExtension()
3811 AddError(result->full_name(), proto, in BuildFieldOrExtension()
3818 if (proto.has_oneof_index()) { in BuildFieldOrExtension()
3819 AddError(result->full_name(), proto, in BuildFieldOrExtension()
3828 if (proto.has_extendee()) { in BuildFieldOrExtension()
3829 AddError(result->full_name(), proto, in BuildFieldOrExtension()
3836 if (proto.has_oneof_index()) { in BuildFieldOrExtension()
3837 if (proto.oneof_index() < 0 || in BuildFieldOrExtension()
3838 proto.oneof_index() >= parent->oneof_decl_count()) { in BuildFieldOrExtension()
3839 AddError(result->full_name(), proto, in BuildFieldOrExtension()
3843 proto.oneof_index(), in BuildFieldOrExtension()
3847 result->containing_oneof_ = parent->oneof_decl(proto.oneof_index()); in BuildFieldOrExtension()
3855 if (!proto.has_options()) { in BuildFieldOrExtension()
3858 AllocateOptions(proto.options(), result); in BuildFieldOrExtension()
3862 proto, Symbol(result)); in BuildFieldOrExtension()
3866 const DescriptorProto::ExtensionRange& proto, in BuildExtensionRange() argument
3869 result->start = proto.start(); in BuildExtensionRange()
3870 result->end = proto.end(); in BuildExtensionRange()
3872 AddError(parent->full_name(), proto, in BuildExtensionRange()
3883 AddError(parent->full_name(), proto, in BuildExtensionRange()
3889 void DescriptorBuilder::BuildOneof(const OneofDescriptorProto& proto, in BuildOneof() argument
3894 full_name->append(proto.name()); in BuildOneof()
3896 ValidateSymbolName(proto.name(), *full_name, proto); in BuildOneof()
3898 result->name_ = tables_->AllocateString(proto.name()); in BuildOneof()
3908 proto, Symbol(result)); in BuildOneof()
3911 void DescriptorBuilder::BuildEnum(const EnumDescriptorProto& proto, in BuildEnum() argument
3918 full_name->append(proto.name()); in BuildEnum()
3920 ValidateSymbolName(proto.name(), *full_name, proto); in BuildEnum()
3922 result->name_ = tables_->AllocateString(proto.name()); in BuildEnum()
3929 if (proto.value_size() == 0) { in BuildEnum()
3932 AddError(result->full_name(), proto, in BuildEnum()
3937 BUILD_ARRAY(proto, result, value, BuildEnumValue, result); in BuildEnum()
3940 if (!proto.has_options()) { in BuildEnum()
3943 AllocateOptions(proto.options(), result); in BuildEnum()
3947 proto, Symbol(result)); in BuildEnum()
3950 void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto, in BuildEnumValue() argument
3953 result->name_ = tables_->AllocateString(proto.name()); in BuildEnumValue()
3954 result->number_ = proto.number(); in BuildEnumValue()
3964 ValidateSymbolName(proto.name(), *full_name, proto); in BuildEnumValue()
3967 if (!proto.has_options()) { in BuildEnumValue()
3970 AllocateOptions(proto.options(), result); in BuildEnumValue()
3978 proto, Symbol(result)); in BuildEnumValue()
4004 AddError(result->full_name(), proto, in BuildEnumValue()
4018 void DescriptorBuilder::BuildService(const ServiceDescriptorProto& proto, in BuildService() argument
4023 full_name->append(proto.name()); in BuildService()
4025 ValidateSymbolName(proto.name(), *full_name, proto); in BuildService()
4027 result->name_ = tables_->AllocateString(proto.name()); in BuildService()
4031 BUILD_ARRAY(proto, result, method, BuildMethod, result); in BuildService()
4034 if (!proto.has_options()) { in BuildService()
4037 AllocateOptions(proto.options(), result); in BuildService()
4041 proto, Symbol(result)); in BuildService()
4044 void DescriptorBuilder::BuildMethod(const MethodDescriptorProto& proto, in BuildMethod() argument
4047 result->name_ = tables_->AllocateString(proto.name()); in BuildMethod()
4055 ValidateSymbolName(proto.name(), *full_name, proto); in BuildMethod()
4062 if (!proto.has_options()) { in BuildMethod()
4065 AllocateOptions(proto.options(), result); in BuildMethod()
4069 proto, Symbol(result)); in BuildMethod()
4077 FileDescriptor* file, const FileDescriptorProto& proto) { in CrossLinkFile() argument
4083 CrossLinkMessage(&file->message_types_[i], proto.message_type(i)); in CrossLinkFile()
4087 CrossLinkField(&file->extensions_[i], proto.extension(i)); in CrossLinkFile()
4091 CrossLinkEnum(&file->enum_types_[i], proto.enum_type(i)); in CrossLinkFile()
4095 CrossLinkService(&file->services_[i], proto.service(i)); in CrossLinkFile()
4100 Descriptor* message, const DescriptorProto& proto) { in CrossLinkMessage() argument
4106 CrossLinkMessage(&message->nested_types_[i], proto.nested_type(i)); in CrossLinkMessage()
4110 CrossLinkEnum(&message->enum_types_[i], proto.enum_type(i)); in CrossLinkMessage()
4114 CrossLinkField(&message->fields_[i], proto.field(i)); in CrossLinkMessage()
4118 CrossLinkField(&message->extensions_[i], proto.extension(i)); in CrossLinkMessage()
4139 proto.oneof_decl(i), in CrossLinkMessage()
4163 FieldDescriptor* field, const FieldDescriptorProto& proto) { in CrossLinkField() argument
4168 if (proto.has_extendee()) { in CrossLinkField()
4169 Symbol extendee = LookupSymbol(proto.extendee(), field->full_name(), in CrossLinkField()
4172 AddNotDefinedError(field->full_name(), proto, in CrossLinkField()
4174 proto.extendee()); in CrossLinkField()
4177 AddError(field->full_name(), proto, in CrossLinkField()
4179 "\"" + proto.extendee() + "\" is not a message type."); in CrossLinkField()
4188 AddError(field->full_name(), proto, in CrossLinkField()
4202 AddError(field->full_name(), proto, in CrossLinkField()
4208 if (proto.has_type_name()) { in CrossLinkField()
4212 bool expecting_enum = (proto.type() == FieldDescriptorProto::TYPE_ENUM) || in CrossLinkField()
4213 proto.has_default_value(); in CrossLinkField()
4216 LookupSymbol(proto.type_name(), field->full_name(), in CrossLinkField()
4221 if (type.IsNull() && !pool_->enforce_weak_ && proto.options().weak()) { in CrossLinkField()
4226 AddNotDefinedError(field->full_name(), proto, in CrossLinkField()
4228 proto.type_name()); in CrossLinkField()
4232 if (!proto.has_type()) { in CrossLinkField()
4239 AddError(field->full_name(), proto, in CrossLinkField()
4241 "\"" + proto.type_name() + "\" is not a type."); in CrossLinkField()
4248 AddError(field->full_name(), proto, in CrossLinkField()
4250 "\"" + proto.type_name() + "\" is not a message type."); in CrossLinkField()
4256 AddError(field->full_name(), proto, in CrossLinkField()
4262 AddError(field->full_name(), proto, in CrossLinkField()
4264 "\"" + proto.type_name() + "\" is not an enum type."); in CrossLinkField()
4281 if (!io::Tokenizer::IsIdentifier(proto.default_value())) { in CrossLinkField()
4282 AddError(field->full_name(), proto, in CrossLinkField()
4290 LookupSymbolNoPlaceholder(proto.default_value(), in CrossLinkField()
4298 AddError(field->full_name(), proto, in CrossLinkField()
4301 "\" has no value named \"" + proto.default_value() + in CrossLinkField()
4312 AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, in CrossLinkField()
4318 AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, in CrossLinkField()
4331 AddError(field->full_name(), proto, in CrossLinkField()
4339 AddError(field->full_name(), proto, in CrossLinkField()
4363 AddWarning(field->full_name(), proto, in CrossLinkField()
4374 EnumDescriptor* enum_type, const EnumDescriptorProto& proto) { in CrossLinkEnum() argument
4380 CrossLinkEnumValue(&enum_type->values_[i], proto.value(i)); in CrossLinkEnum()
4393 ServiceDescriptor* service, const ServiceDescriptorProto& proto) { in CrossLinkService() argument
4399 CrossLinkMethod(&service->methods_[i], proto.method(i)); in CrossLinkService()
4404 MethodDescriptor* method, const MethodDescriptorProto& proto) { in CrossLinkMethod() argument
4409 Symbol input_type = LookupSymbol(proto.input_type(), method->full_name()); in CrossLinkMethod()
4411 AddNotDefinedError(method->full_name(), proto, in CrossLinkMethod()
4413 proto.input_type()); in CrossLinkMethod()
4415 AddError(method->full_name(), proto, in CrossLinkMethod()
4417 "\"" + proto.input_type() + "\" is not a message type."); in CrossLinkMethod()
4422 Symbol output_type = LookupSymbol(proto.output_type(), method->full_name()); in CrossLinkMethod()
4424 AddNotDefinedError(method->full_name(), proto, in CrossLinkMethod()
4426 proto.output_type()); in CrossLinkMethod()
4428 AddError(method->full_name(), proto, in CrossLinkMethod()
4430 "\"" + proto.output_type() + "\" is not a message type."); in CrossLinkMethod()
4441 proto.array_name(i)); \
4455 const FileDescriptorProto& proto) { in ValidateFileOptions() argument
4466 file->name(), proto, in ValidateFileOptions()
4479 const DescriptorProto& proto) { in ValidateMessageOptions() argument
4492 message->full_name(), proto.extension_range(i), in ValidateMessageOptions()
4501 const FieldDescriptorProto& proto) { in ValidateFieldOptions() argument
4503 ValidateMapKey(field, proto); in ValidateFieldOptions()
4509 AddError(field->full_name(), proto, in ValidateFieldOptions()
4518 field->full_name(), proto, in ValidateFieldOptions()
4532 AddError(field->full_name(), proto, in ValidateFieldOptions()
4537 AddError(field->full_name(), proto, in ValidateFieldOptions()
4547 AddError(field->full_name(), proto, in ValidateFieldOptions()
4557 const EnumDescriptorProto& proto) { in ValidateEnumOptions() argument
4571 AddError(enm->full_name(), proto, in ValidateEnumOptions()
4592 const ServiceDescriptorProto& proto) { in ValidateServiceOptions() argument
4596 AddError(service->full_name(), proto, in ValidateServiceOptions()
4612 const FieldDescriptorProto& proto) { in ValidateMapKey() argument
4614 AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, in ValidateMapKey()
4620 AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, in ValidateMapKey()
4627 AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, in ValidateMapKey()
4642 AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, in ValidateMapKey()
4650 AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, in ValidateMapKey()
4656 AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, in ValidateMapKey()