|
|
@ -1306,8 +1306,11 @@ int CommandLineInterface::Run(int argc, const char* const argv[]) { |
|
|
|
// something like descriptor->file()->name(), but ExtensionRange does not
|
|
|
|
// something like descriptor->file()->name(), but ExtensionRange does not
|
|
|
|
// support this.
|
|
|
|
// support this.
|
|
|
|
for (const google::protobuf::FileDescriptor* file : parsed_files) { |
|
|
|
for (const google::protobuf::FileDescriptor* file : parsed_files) { |
|
|
|
google::protobuf::internal::VisitDescriptors(*file, [&](const auto& descriptor) { |
|
|
|
FileDescriptorProto proto; |
|
|
|
if (!ValidateTargetConstraints(descriptor.options(), *descriptor_pool, |
|
|
|
file->CopyTo(&proto); |
|
|
|
|
|
|
|
google::protobuf::internal::VisitDescriptors( |
|
|
|
|
|
|
|
*file, proto, [&](const auto& descriptor, const auto& proto) { |
|
|
|
|
|
|
|
if (!ValidateTargetConstraints(proto.options(), *descriptor_pool, |
|
|
|
*error_collector, file->name(), |
|
|
|
*error_collector, file->name(), |
|
|
|
GetTargetType(&descriptor))) { |
|
|
|
GetTargetType(&descriptor))) { |
|
|
|
validation_error = true; |
|
|
|
validation_error = true; |
|
|
|