diff --git a/src/google/protobuf/compiler/cpp/field.cc b/src/google/protobuf/compiler/cpp/field.cc index df27ce512de3f..0e897b0719e00 100644 --- a/src/google/protobuf/compiler/cpp/field.cc +++ b/src/google/protobuf/compiler/cpp/field.cc @@ -83,12 +83,8 @@ std::vector FieldVars(const FieldDescriptor* field, const Options& opts) { "::internal::TSanRead(&_impl_)")}, // Old-style names. - {"field", FieldMemberName(field, split)}, - {"declared_type", DeclaredTypeMethodName(field->type())}, {"classname", ClassName(FieldScope(field), false)}, {"ns", Namespace(field)}, - {"tag_size", WireFormat::TagSize(field->number(), field->type())}, - {"deprecated_attr", DeprecatedAttribute(opts, field)}, Sub("WeakDescriptorSelfPin", UsingImplicitWeakDescriptor(field->file(), opts) ? absl::StrCat( @@ -202,7 +198,7 @@ void FieldGeneratorBase::GenerateOneofCopyConstruct(io::Printer* p) const { ABSL_CHECK(!field_->is_extension()) << "Not supported"; ABSL_CHECK(!field_->is_repeated()) << "Not supported"; ABSL_CHECK(!field_->is_map()) << "Not supported"; - p->Emit("$field$ = from.$field$;\n"); + p->Emit("$field_$ = from.$field_$;\n"); } void FieldGeneratorBase::GenerateAggregateInitializer(io::Printer* p) const { @@ -212,7 +208,7 @@ void FieldGeneratorBase::GenerateAggregateInitializer(io::Printer* p) const { )cc"); } else { p->Emit(R"cc( - decltype($field$){arena}, + decltype($field_$){arena}, )cc"); } } @@ -220,14 +216,14 @@ void FieldGeneratorBase::GenerateAggregateInitializer(io::Printer* p) const { void FieldGeneratorBase::GenerateConstexprAggregateInitializer( io::Printer* p) const { p->Emit(R"cc( - /*decltype($field$)*/ {}, + /*decltype($field_$)*/ {}, )cc"); } void FieldGeneratorBase::GenerateCopyAggregateInitializer( io::Printer* p) const { p->Emit(R"cc( - decltype($field$){from.$field$}, + decltype($field_$){from.$field_$}, )cc"); } @@ -236,7 +232,7 @@ void FieldGeneratorBase::GenerateCopyConstructorCode(io::Printer* p) const { // There is no copy constructor for the `Split` struct, so we need to copy // the value here. Formatter format(p, variables_); - format("$field$ = from.$field$;\n"); + format("$field_$ = from.$field_$;\n"); } } diff --git a/src/google/protobuf/compiler/cpp/field.h b/src/google/protobuf/compiler/cpp/field.h index 557780c262b8f..44d062090ed72 100644 --- a/src/google/protobuf/compiler/cpp/field.h +++ b/src/google/protobuf/compiler/cpp/field.h @@ -415,11 +415,11 @@ class FieldGenerator { // GeneratePrivateMembers(). // // These go into the SharedCtor's aggregate initialization of the _impl_ - // struct and must follow the syntax `decltype($field$){$default$}`. + // struct and must follow the syntax `decltype($field_$){$default$}`. // Does not include `:` or `,` separators. Default values should be specified // here when possible. // - // NOTE: We use `decltype($field$)` for both explicit construction and the + // NOTE: We use `decltype($field_$)` for both explicit construction and the // fact that it's self-documenting. Pre-C++17, copy elision isn't guaranteed // in aggregate initialization so a valid copy/move constructor must exist // (even though it's not used). Because of this, we need to comment out the @@ -433,7 +433,7 @@ class FieldGenerator { // GeneratePrivateMembers(). // // These go into the constexpr constructor's aggregate initialization of the - // _impl_ struct and must follow the syntax `/*decltype($field$)*/{}` (see + // _impl_ struct and must follow the syntax `/*decltype($field_$)*/{}` (see // above). Does not include `:` or `,` separators. void GenerateConstexprAggregateInitializer(io::Printer* p) const { auto vars = PushVarsForCall(p); @@ -444,7 +444,7 @@ class FieldGenerator { // GeneratePrivateMembers(). // // These go into the copy constructor's aggregate initialization of the _impl_ - // struct and must follow the syntax `decltype($field$){from.$field$}` (see + // struct and must follow the syntax `decltype($field_$){from.$field_$}` (see // above). Does not include `:` or `,` separators. void GenerateCopyAggregateInitializer(io::Printer* p) const { auto vars = PushVarsForCall(p); diff --git a/src/google/protobuf/compiler/cpp/field_generators/cord_field.cc b/src/google/protobuf/compiler/cpp/field_generators/cord_field.cc index 2f004a16c6f6c..d3e67d80d7da4 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/cord_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/cord_field.cc @@ -111,7 +111,7 @@ class CordFieldGenerator : public FieldGeneratorBase { void GenerateOneofCopyConstruct(io::Printer* p) const override { auto vars = p->WithVars(variables_); p->Emit(R"cc( - $field$ = $pb$::Arena::Create(arena, *from.$field$); + $field_$ = $pb$::Arena::Create(arena, *from.$field_$); )cc"); } }; @@ -170,9 +170,9 @@ void CordFieldGenerator::GenerateAccessorDeclarations(io::Printer* p) const { p->WithVars(AnnotatedAccessors(field_, {"mutable_"}, Semantic::kAlias)); p->Emit(R"cc( - [[nodiscard]] $deprecated_attr$const ::absl::Cord& $name$() const; - $deprecated_attr$void $set_name$(const ::absl::Cord& value); - $deprecated_attr$void $set_name$(::absl::string_view value); + [[nodiscard]] $DEPRECATED$ const ::absl::Cord& $name$() const; + $DEPRECATED$void $set_name$(const ::absl::Cord& value); + $DEPRECATED$void $set_name$(::absl::string_view value); private: const ::absl::Cord& $_internal_name$() const; @@ -188,7 +188,7 @@ void CordFieldGenerator::GenerateInlineAccessorDefinitions( auto v = p->WithVars(variables_); p->Emit(R"cc( inline const ::absl::Cord& $classname$::_internal_$name_internal$() const { - return $field$; + return $field_$; } )cc"); p->Emit(R"cc( @@ -204,7 +204,7 @@ void CordFieldGenerator::GenerateInlineAccessorDefinitions( inline void $classname$::_internal_set_$name_internal$( const ::absl::Cord& value) { $set_hasbit$; - $field$ = value; + $field_$ = value; } )cc"); p->Emit(R"cc( @@ -221,7 +221,7 @@ void CordFieldGenerator::GenerateInlineAccessorDefinitions( $WeakDescriptorSelfPin$; $PrepareSplitMessageForWrite$; $set_hasbit$; - $field$ = value; + $field_$ = value; $annotate_set$; // @@protoc_insertion_point(field_set_string_piece:$full_name$) } @@ -230,7 +230,7 @@ void CordFieldGenerator::GenerateInlineAccessorDefinitions( inline ::absl::Cord* $nonnull$ $classname$::_internal_mutable_$name_internal$() { $set_hasbit$; - return &$field$; + return &$field_$; } )cc"); } @@ -239,11 +239,11 @@ void CordFieldGenerator::GenerateClearingCode(io::Printer* p) const { auto v = p->WithVars(variables_); if (field_->default_value_string().empty()) { p->Emit(R"cc( - $field$.Clear(); + $field_$.Clear(); )cc"); } else { p->Emit(R"cc( - $field$ = ::absl::string_view($default$, $default_length$); + $field_$ = ::absl::string_view($default$, $default_length$); )cc"); } } @@ -258,7 +258,7 @@ void CordFieldGenerator::GenerateMergingCode(io::Printer* p) const { void CordFieldGenerator::GenerateSwappingCode(io::Printer* p) const { auto v = p->WithVars(variables_); p->Emit(R"cc( - $field$.swap(other->$field$); + $field_$.swap(other->$field_$); )cc"); } @@ -266,7 +266,7 @@ void CordFieldGenerator::GenerateArenaDestructorCode(io::Printer* p) const { auto v = p->WithVars(variables_); // _this is the object being destructed (we are inside a static method here). p->Emit(R"cc( - _this->$field$.::absl::Cord::~Cord(); + _this->$field_$.::absl::Cord::~Cord(); )cc"); } @@ -279,16 +279,16 @@ void CordFieldGenerator::GenerateSerializeWithCachedSizesToArray( absl::Substitute("this_._internal_$0(), ", p->LookupVar("name"))); } p->Emit(R"cc( - target = stream->Write$declared_type$($number$, this_._internal_$name$(), - target); + target = + stream->Write$DeclaredType$($number$, this_._internal_$name$(), target); )cc"); } void CordFieldGenerator::GenerateByteSize(io::Printer* p) const { auto v = p->WithVars(variables_); p->Emit(R"cc( - total_size += $tag_size$ + $pbi$::WireFormatLite::$declared_type$Size( - this_._internal_$name$()); + total_size += $kTagBytes$ + $pbi$::WireFormatLite::$DeclaredType$Size( + this_._internal_$name$()); )cc"); } @@ -296,13 +296,13 @@ void CordFieldGenerator::GenerateConstexprAggregateInitializer( io::Printer* p) const { if (field_->default_value_string().empty()) { p->Emit(R"cc( - /*decltype($field$)*/ {}, + /*decltype($field_$)*/ {}, )cc"); } else { p->Emit( {{"Split", should_split() ? "Split::" : ""}}, R"cc( - /*decltype($field$)*/ {::absl::strings_internal::MakeStringConstant( + /*decltype($field_$)*/ {::absl::strings_internal::MakeStringConstant( $classname$::Impl_::$Split$_default_$name$_func_{})}, )cc"); } @@ -315,7 +315,7 @@ void CordFieldGenerator::GenerateAggregateInitializer(io::Printer* p) const { )cc"); } else { p->Emit(R"cc( - decltype($field$){}, + decltype($field_$){}, )cc"); } } @@ -353,7 +353,7 @@ void CordOneofFieldGenerator::GenerateInlineAccessorDefinitions( p->Emit(R"cc( inline const ::absl::Cord& $classname$::_internal_$name_internal$() const { if ($has_field$) { - return *$field$; + return *$field_$; } return $default_variable$; } @@ -373,9 +373,9 @@ void CordOneofFieldGenerator::GenerateInlineAccessorDefinitions( if ($not_has_field$) { clear_$oneof_name$(); set_has_$name_internal$(); - $field$ = $pb$::Arena::Create<::absl::Cord>(GetArena()); + $field_$ = $pb$::Arena::Create<::absl::Cord>(GetArena()); } - *$field$ = value; + *$field_$ = value; $annotate_set$; // @@protoc_insertion_point(field_set:$full_name$) } @@ -386,9 +386,9 @@ void CordOneofFieldGenerator::GenerateInlineAccessorDefinitions( if ($not_has_field$) { clear_$oneof_name$(); set_has_$name_internal$(); - $field$ = $pb$::Arena::Create<::absl::Cord>(GetArena()); + $field_$ = $pb$::Arena::Create<::absl::Cord>(GetArena()); } - *$field$ = value; + *$field_$ = value; $annotate_set$; // @@protoc_insertion_point(field_set_string_piece:$full_name$) } @@ -399,9 +399,9 @@ void CordOneofFieldGenerator::GenerateInlineAccessorDefinitions( if ($not_has_field$) { clear_$oneof_name$(); set_has_$name_internal$(); - $field$ = $pb$::Arena::Create<::absl::Cord>(GetArena()); + $field_$ = $pb$::Arena::Create<::absl::Cord>(GetArena()); } - return $field$; + return $field_$; } )cc"); } @@ -431,7 +431,7 @@ void CordOneofFieldGenerator::GenerateClearingCode(io::Printer* p) const { auto v = p->WithVars(variables_); p->Emit(R"cc( if (GetArena() == nullptr) { - delete $field$; + delete $field_$; } )cc"); } @@ -449,9 +449,9 @@ void CordOneofFieldGenerator::GenerateArenaDestructorCode( void CordOneofFieldGenerator::GenerateMergingCode(io::Printer* p) const { p->Emit(R"cc( if (oneof_needs_init) { - _this->$field$ = $pb$::Arena::Create(arena); + _this->$field_$ = $pb$::Arena::Create(arena); } - *_this->$field$ = *from.$field$; + *_this->$field_$ = *from.$field_$; )cc"); } diff --git a/src/google/protobuf/compiler/cpp/field_generators/message_field.cc b/src/google/protobuf/compiler/cpp/field_generators/message_field.cc index e2e0cb9dc76dd..2d554b08dd2a9 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/message_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/message_field.cc @@ -134,7 +134,7 @@ class SingularMessage : public FieldGeneratorBase { void GenerateOneofCopyConstruct(io::Printer* p) const override { p->Emit(R"cc( - $field$ = $superclass$::CopyConstruct(arena, *from.$field$); + $field_$ = $superclass$::CopyConstruct(arena, *from.$field_$); )cc"); } @@ -392,14 +392,14 @@ void SingularMessage::GenerateSerializeWithCachedSizesToArray( io::Printer* p) const { if (!is_group()) { p->Emit(R"cc( - target = $pbi$::WireFormatLite::InternalWrite$declared_type$( + target = $pbi$::WireFormatLite::InternalWrite$DeclaredType$( $number$, *this_.$field_$, this_.$field_$->GetCachedSize(), target, stream); )cc"); } else { p->Emit(R"cc( target = stream->EnsureSpace(target); - target = $pbi$::WireFormatLite::InternalWrite$declared_type$( + target = $pbi$::WireFormatLite::InternalWrite$DeclaredType$( $number$, *this_.$field_$, target, stream); )cc"); } @@ -407,8 +407,8 @@ void SingularMessage::GenerateSerializeWithCachedSizesToArray( void SingularMessage::GenerateByteSize(io::Printer* p) const { p->Emit(R"cc( - total_size += $tag_size$ + - $pbi$::WireFormatLite::$declared_type$Size(*this_.$field_$); + total_size += $kTagBytes$ + + $pbi$::WireFormatLite::$DeclaredType$Size(*this_.$field_$); )cc"); } @@ -1010,72 +1010,69 @@ void RepeatedMessage::GenerateDestructorCode(io::Printer* p) const { void RepeatedMessage::GenerateSerializeWithCachedSizesToArray( io::Printer* p) const { if (is_weak()) { - p->Emit({{"serialize_field", - [&] { - if (field_->type() == FieldDescriptor::TYPE_MESSAGE) { - p->Emit( - R"cc( - target = - $pbi$::WireFormatLite::InternalWrite$declared_type$( - $number$, **it, (**it).GetCachedSize(), target, - stream); - )cc"); - } else { - p->Emit( - R"cc( - target = stream->EnsureSpace(target); - target = - $pbi$::WireFormatLite::InternalWrite$declared_type$( - $number$, **it, target, stream); - )cc"); - } - }}}, - R"cc( - for (auto it = this_.$field_$.pointer_begin(), - end = this_.$field_$.pointer_end(); - it < end; ++it) { - $serialize_field$; - } - )cc"); + p->Emit( + {{"serialize_field", + [&] { + if (field_->type() == FieldDescriptor::TYPE_MESSAGE) { + p->Emit( + R"cc( + target = $pbi$::WireFormatLite::InternalWrite$DeclaredType$( + $number$, **it, (**it).GetCachedSize(), target, stream); + )cc"); + } else { + p->Emit( + R"cc( + target = stream->EnsureSpace(target); + target = $pbi$::WireFormatLite::InternalWrite$DeclaredType$( + $number$, **it, target, stream); + )cc"); + } + }}}, + R"cc( + for (auto it = this_.$field_$.pointer_begin(), + end = this_.$field_$.pointer_end(); + it < end; ++it) { + $serialize_field$; + } + )cc"); } else { - p->Emit({{"serialize_field", - [&] { - if (field_->type() == FieldDescriptor::TYPE_MESSAGE) { - p->Emit( - R"cc( - const auto& repfield = this_._internal_$name$().Get(i); - target = - $pbi$::WireFormatLite::InternalWrite$declared_type$( - $number$, repfield, repfield.GetCachedSize(), - target, stream); - )cc"); - } else { - p->Emit( - R"cc( - target = stream->EnsureSpace(target); - target = - $pbi$::WireFormatLite::InternalWrite$declared_type$( - $number$, this_._internal_$name$().Get(i), - target, stream); - )cc"); - } - }}}, - R"cc( - for (unsigned i = 0, n = static_cast( - this_._internal_$name$_size()); - i < n; i++) { - $serialize_field$; - } - )cc"); + p->Emit( + {{"serialize_field", + [&] { + if (field_->type() == FieldDescriptor::TYPE_MESSAGE) { + p->Emit( + R"cc( + const auto& repfield = this_._internal_$name$().Get(i); + target = $pbi$::WireFormatLite::InternalWrite$DeclaredType$( + $number$, repfield, repfield.GetCachedSize(), target, + stream); + )cc"); + } else { + p->Emit( + R"cc( + target = stream->EnsureSpace(target); + target = $pbi$::WireFormatLite::InternalWrite$DeclaredType$( + $number$, this_._internal_$name$().Get(i), target, + stream); + )cc"); + } + }}}, + R"cc( + for (unsigned i = 0, n = static_cast( + this_._internal_$name$_size()); + i < n; i++) { + $serialize_field$; + } + )cc"); } } void RepeatedMessage::GenerateByteSize(io::Printer* p) const { p->Emit( R"cc( - total_size += $tag_size$UL * this_._internal_$name$_size(); + total_size += $kTagBytes$UL * this_._internal_$name$_size(); for (const auto& msg : this_._internal$_weak$_$name$()) { - total_size += $pbi$::WireFormatLite::$declared_type$Size(msg); + total_size += $pbi$::WireFormatLite::$DeclaredType$Size(msg); } )cc"); } diff --git a/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc b/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc index dbeba006a0411..b16c9a8e22527 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc @@ -241,7 +241,7 @@ void SingularPrimitive::GenerateSerializeWithCachedSizesToArray( // of the tag+value to the array p->Emit(R"cc( target = - $pbi$::WireFormatLite::Write$declared_type$ToArrayWithField<$number$>( + $pbi$::WireFormatLite::Write$DeclaredType$ToArrayWithField<$number$>( stream, this_._internal_$name$(), target); )cc"); } else { diff --git a/src/google/protobuf/compiler/cpp/field_generators/string_field.cc b/src/google/protobuf/compiler/cpp/field_generators/string_field.cc index b1d6f3fadc53a..1f1ea3124b16a 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/string_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/string_field.cc @@ -162,10 +162,10 @@ class SingularString : public FieldGeneratorBase { void GenerateOneofCopyConstruct(io::Printer* p) const override { if (is_inlined() || EmptyDefault()) { - p->Emit("new (&$field$) decltype($field$){arena, from.$field$};\n"); + p->Emit("new (&$field_$) decltype($field_$){arena, from.$field_$};\n"); } else { p->Emit( - "new (&$field$) decltype($field$){arena, from.$field$," + "new (&$field_$) decltype($field_$){arena, from.$field_$," " $default_variable_field$};\n"); } } diff --git a/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc b/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc index 9eea72ec4f6fb..7bd1d33a83d55 100644 --- a/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc +++ b/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc @@ -183,10 +183,10 @@ class SingularStringView : public FieldGeneratorBase { void GenerateOneofCopyConstruct(io::Printer* p) const override { if (is_inlined() || EmptyDefault() || use_micro_string()) { - p->Emit("new (&$field$) decltype($field$){arena, from.$field$};\n"); + p->Emit("new (&$field_$) decltype($field_$){arena, from.$field_$};\n"); } else { p->Emit( - "new (&$field$) decltype($field$){arena, from.$field$," + "new (&$field_$) decltype($field_$){arena, from.$field_$," " $default_variable_field$};\n"); } } diff --git a/src/google/protobuf/compiler/cpp/message.cc b/src/google/protobuf/compiler/cpp/message.cc index d5ad7d22a493a..0a7b7e3d447af 100644 --- a/src/google/protobuf/compiler/cpp/message.cc +++ b/src/google/protobuf/compiler/cpp/message.cc @@ -314,7 +314,7 @@ void EmitNonDefaultCheckForString(io::Printer* p, absl::string_view prefix, { {"prefix", prefix}, {"name", FieldName(field)}, - {"field", FieldMemberName(field, split)}, + {"field_", FieldMemberName(field, split)}, }, // The merge semantic is "overwrite if present". This statement // is emitted when hasbit is set and src proto field is @@ -326,7 +326,7 @@ void EmitNonDefaultCheckForString(io::Printer* p, absl::string_view prefix, // do nothing. // This will allow destructors and Clear() to be simpler. R"cc( - if (_this->$field$.IsDefault()) { + if (_this->$field_$.IsDefault()) { _this->_internal_set_$name$(""); } )cc"); @@ -791,12 +791,12 @@ void MessageGenerator::GenerateFieldAccessorDeclarations(io::Printer* p) { {"sizer", [&] { if (!field->is_repeated()) return; - p->Emit({Sub("name_size", absl::StrCat(name, "_size")) - .AnnotatedAs(field)}, - R"cc( - [[nodiscard]] $deprecated_attr $int $name_size$() - $const_impl$; - )cc"); + p->Emit( + {Sub("name_size", absl::StrCat(name, "_size")) + .AnnotatedAs(field)}, + R"cc( + [[nodiscard]] $DEPRECATED $int $name_size$() $const_impl$; + )cc"); p->Emit({Sub("_internal_name_size", absl::StrCat("_internal_", name, "_size")) @@ -811,12 +811,12 @@ void MessageGenerator::GenerateFieldAccessorDeclarations(io::Printer* p) { {"hazzer", [&] { if (!field->has_presence()) return; - p->Emit({Sub("has_name", absl::StrCat("has_", name)) - .AnnotatedAs(field)}, - R"cc( - [[nodiscard]] $deprecated_attr $bool $has_name$() - $const_impl$; - )cc"); + p->Emit( + {Sub("has_name", absl::StrCat("has_", name)) + .AnnotatedAs(field)}, + R"cc( + [[nodiscard]] $DEPRECATED $bool $has_name$() $const_impl$; + )cc"); }}, {"internal_hazzer", [&] { @@ -841,7 +841,7 @@ void MessageGenerator::GenerateFieldAccessorDeclarations(io::Printer* p) { Semantic::kSet, })}, R"cc( - $deprecated_attr $void $clear_name$() $impl$; + $DEPRECATED $void $clear_name$() $impl$; )cc"); }}, {"accessors", @@ -1149,7 +1149,7 @@ void MessageGenerator::GenerateSingularFieldHasBits( // information to the compiler, we allow it to eliminate // unnecessary null checks later on. p->Emit( - R"cc(PROTOBUF_ASSUME(!value || $field$ != nullptr);)cc"); + R"cc(PROTOBUF_ASSUME(!value || $field_$ != nullptr);)cc"); } }} .WithSuffix(";")}, @@ -2673,9 +2673,9 @@ void MessageGenerator::GenerateZeroInitFields(io::Printer* p) const { sizeof($Impl$::$last$_)); )cc"); } else { - p->Emit({{"field", FieldMemberName(first, false)}}, + p->Emit({{"field_", FieldMemberName(first, false)}}, R"cc( - $field$ = {}; + $field_$ = {}; )cc"); } first = nullptr; @@ -3101,9 +3101,9 @@ void MessageGenerator::GenerateCopyInitFields(io::Printer* p) const { sizeof($Impl$::$last$_)); )cc"); } else { - p->Emit({{"field", FieldMemberName(first, split)}}, + p->Emit({{"field_", FieldMemberName(first, split)}}, R"cc( - $field$ = from.$field$; + $field_$ = from.$field_$; )cc"); } first = nullptr; @@ -3124,7 +3124,7 @@ void MessageGenerator::GenerateCopyInitFields(io::Printer* p) const { auto has_message = [&](const FieldDescriptor* field) { if (has_bit_indices_.empty()) { - p->Emit("from.$field$ != nullptr"); + p->Emit("from.$field_$ != nullptr"); } else { int has_bit_index = has_bit_indices_[field->index()]; p->Emit({{"condition", GenerateConditionMaybeWithProbabilityForField( @@ -3138,9 +3138,9 @@ void MessageGenerator::GenerateCopyInitFields(io::Printer* p) const { p->Emit({{"has_msg", [&] { has_message(field); }}, {"submsg", FieldMessageTypeName(field, options_)}}, R"cc( - $field$ = ($has_msg$) - ? $superclass$::CopyConstruct(arena, *from.$field$) - : nullptr; + $field_$ = ($has_msg$) ? $superclass$::CopyConstruct( + arena, *from.$field_$) + : nullptr; )cc"); }; @@ -3196,7 +3196,6 @@ void MessageGenerator::GenerateCopyInitFields(io::Printer* p) const { for (const auto* field : internal::FieldRange(oneof)) { p->Emit( {{"Name", UnderscoresToCamelCase(field->name(), true)}, - {"field", FieldMemberName(field, /*split=*/false)}, {"body", [&] { field_generators_.get(field).GenerateOneofCopyConstruct( diff --git a/src/google/protobuf/compiler/java/java_features.pb.h b/src/google/protobuf/compiler/java/java_features.pb.h index 43fe3254b3328..87da0f2fdf28c 100644 --- a/src/google/protobuf/compiler/java/java_features.pb.h +++ b/src/google/protobuf/compiler/java/java_features.pb.h @@ -517,8 +517,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final : kNestInFileClassFieldNumber = 5, }; // optional .pb.JavaFeatures.Utf8Validation utf8_validation = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_utf8_validation() - const; + [[nodiscard]] bool has_utf8_validation() const; void clear_utf8_validation() ; [[nodiscard]] ::pb::JavaFeatures_Utf8Validation utf8_validation() const; void set_utf8_validation(::pb::JavaFeatures_Utf8Validation value); @@ -529,8 +528,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final : public: // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_legacy_closed_enum() - const; + [[nodiscard]] bool has_legacy_closed_enum() const; void clear_legacy_closed_enum() ; [[nodiscard]] bool legacy_closed_enum() const; void set_legacy_closed_enum(bool value); @@ -541,8 +539,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final : public: // optional bool large_enum = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_large_enum() - const; + [[nodiscard]] bool has_large_enum() const; void clear_large_enum() ; [[nodiscard]] bool large_enum() const; void set_large_enum(bool value); @@ -553,8 +550,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final : public: // optional bool use_old_outer_classname_default = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_use_old_outer_classname_default() - const; + [[nodiscard]] bool has_use_old_outer_classname_default() const; void clear_use_old_outer_classname_default() ; [[nodiscard]] bool use_old_outer_classname_default() const; void set_use_old_outer_classname_default(bool value); @@ -565,8 +561,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED JavaFeatures final : public: // optional .pb.JavaFeatures.NestInFileClassFeature.NestInFileClass nest_in_file_class = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_SERVICE, edition_defaults = { - [[nodiscard]] bool has_nest_in_file_class() - const; + [[nodiscard]] bool has_nest_in_file_class() const; void clear_nest_in_file_class() ; [[nodiscard]] ::pb::JavaFeatures_NestInFileClassFeature_NestInFileClass nest_in_file_class() const; void set_nest_in_file_class(::pb::JavaFeatures_NestInFileClassFeature_NestInFileClass value); diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index 6fd31e1f94fa8..48d74ab28dc88 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -1228,9 +1228,9 @@ CodeGeneratorRequest::CodeGeneratorRequest( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.compiler_version_ = (CheckHasBit(cached_has_bits, 0x00000008U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.compiler_version_) - : nullptr; + _impl_.compiler_version_ = (CheckHasBit(cached_has_bits, 0x00000008U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.compiler_version_) + : nullptr; // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorRequest) } @@ -1376,10 +1376,9 @@ ::uint8_t* PROTOBUF_NONNULL CodeGeneratorRequest::_InternalSerialize( this_._internal_proto_file_size()); i < n; i++) { const auto& repfield = this_._internal_proto_file().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 15, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 15, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -1389,10 +1388,9 @@ ::uint8_t* PROTOBUF_NONNULL CodeGeneratorRequest::_InternalSerialize( this_._internal_source_file_descriptors_size()); i < n; i++) { const auto& repfield = this_._internal_source_file_descriptors().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 17, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 17, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -1580,9 +1578,9 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.generated_code_info_ = (CheckHasBit(cached_has_bits, 0x00000008U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.generated_code_info_) - : nullptr; + _impl_.generated_code_info_ = (CheckHasBit(cached_has_bits, 0x00000008U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.generated_code_info_) + : nullptr; // @@protoc_insertion_point(copy_constructor:google.protobuf.compiler.CodeGeneratorResponse.File) } @@ -2010,10 +2008,9 @@ ::uint8_t* PROTOBUF_NONNULL CodeGeneratorResponse::_InternalSerialize( this_._internal_file_size()); i < n; i++) { const auto& repfield = this_._internal_file().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 15, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 15, repfield, repfield.GetCachedSize(), target, + stream); } } diff --git a/src/google/protobuf/compiler/plugin.pb.h b/src/google/protobuf/compiler/plugin.pb.h index 585d1247ffdaf..1ad56f8a32949 100644 --- a/src/google/protobuf/compiler/plugin.pb.h +++ b/src/google/protobuf/compiler/plugin.pb.h @@ -307,8 +307,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Version final : publi kPatchFieldNumber = 3, }; // optional string suffix = 4; - [[nodiscard]] bool has_suffix() - const; + [[nodiscard]] bool has_suffix() const; void clear_suffix() ; [[nodiscard]] const ::std::string& suffix() const; template @@ -324,8 +323,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Version final : publi public: // optional int32 major = 1; - [[nodiscard]] bool has_major() - const; + [[nodiscard]] bool has_major() const; void clear_major() ; [[nodiscard]] ::int32_t major() const; void set_major(::int32_t value); @@ -336,8 +334,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Version final : publi public: // optional int32 minor = 2; - [[nodiscard]] bool has_minor() - const; + [[nodiscard]] bool has_minor() const; void clear_minor() ; [[nodiscard]] ::int32_t minor() const; void set_minor(::int32_t value); @@ -348,8 +345,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED Version final : publi public: // optional int32 patch = 3; - [[nodiscard]] bool has_patch() - const; + [[nodiscard]] bool has_patch() const; void clear_patch() ; [[nodiscard]] ::int32_t patch() const; void set_patch(::int32_t value); @@ -557,8 +553,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse kGeneratedCodeInfoFieldNumber = 16, }; // optional string name = 1; - [[nodiscard]] bool has_name() - const; + [[nodiscard]] bool has_name() const; void clear_name() ; [[nodiscard]] const ::std::string& name() const; template @@ -574,8 +569,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse public: // optional string insertion_point = 2; - [[nodiscard]] bool has_insertion_point() - const; + [[nodiscard]] bool has_insertion_point() const; void clear_insertion_point() ; [[nodiscard]] const ::std::string& insertion_point() const; template @@ -591,8 +585,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse public: // optional string content = 15; - [[nodiscard]] bool has_content() - const; + [[nodiscard]] bool has_content() const; void clear_content() ; [[nodiscard]] const ::std::string& content() const; template @@ -608,8 +601,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse public: // optional .google.protobuf.GeneratedCodeInfo generated_code_info = 16; - [[nodiscard]] bool has_generated_code_info() - const; + [[nodiscard]] bool has_generated_code_info() const; void clear_generated_code_info() ; [[nodiscard]] const ::google::protobuf::GeneratedCodeInfo& generated_code_info() const; [[nodiscard]] ::google::protobuf::GeneratedCodeInfo* PROTOBUF_NULLABLE release_generated_code_info(); @@ -844,8 +836,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse kMaximumEditionFieldNumber = 4, }; // repeated .google.protobuf.compiler.CodeGeneratorResponse.File file = 15; - [[nodiscard]] int file_size() - const; + [[nodiscard]] int file_size() const; private: int _internal_file_size() const; @@ -865,8 +856,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse public: // optional string error = 1; - [[nodiscard]] bool has_error() - const; + [[nodiscard]] bool has_error() const; void clear_error() ; [[nodiscard]] const ::std::string& error() const; template @@ -882,8 +872,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse public: // optional uint64 supported_features = 2; - [[nodiscard]] bool has_supported_features() - const; + [[nodiscard]] bool has_supported_features() const; void clear_supported_features() ; [[nodiscard]] ::uint64_t supported_features() const; void set_supported_features(::uint64_t value); @@ -894,8 +883,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse public: // optional int32 minimum_edition = 3; - [[nodiscard]] bool has_minimum_edition() - const; + [[nodiscard]] bool has_minimum_edition() const; void clear_minimum_edition() ; [[nodiscard]] ::int32_t minimum_edition() const; void set_minimum_edition(::int32_t value); @@ -906,8 +894,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorResponse public: // optional int32 maximum_edition = 4; - [[nodiscard]] bool has_maximum_edition() - const; + [[nodiscard]] bool has_maximum_edition() const; void clear_maximum_edition() ; [[nodiscard]] ::int32_t maximum_edition() const; void set_maximum_edition(::int32_t value); @@ -1122,8 +1109,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest kSourceFileDescriptorsFieldNumber = 17, }; // repeated string file_to_generate = 1; - [[nodiscard]] int file_to_generate_size() - const; + [[nodiscard]] int file_to_generate_size() const; private: int _internal_file_to_generate_size() const; @@ -1149,8 +1135,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest public: // repeated .google.protobuf.FileDescriptorProto proto_file = 15; - [[nodiscard]] int proto_file_size() - const; + [[nodiscard]] int proto_file_size() const; private: int _internal_proto_file_size() const; @@ -1170,8 +1155,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest public: // optional string parameter = 2; - [[nodiscard]] bool has_parameter() - const; + [[nodiscard]] bool has_parameter() const; void clear_parameter() ; [[nodiscard]] const ::std::string& parameter() const; template @@ -1187,8 +1171,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest public: // optional .google.protobuf.compiler.Version compiler_version = 3; - [[nodiscard]] bool has_compiler_version() - const; + [[nodiscard]] bool has_compiler_version() const; void clear_compiler_version() ; [[nodiscard]] const ::google::protobuf::compiler::Version& compiler_version() const; [[nodiscard]] ::google::protobuf::compiler::Version* PROTOBUF_NULLABLE release_compiler_version(); @@ -1203,8 +1186,7 @@ class PROTOC_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CodeGeneratorRequest public: // repeated .google.protobuf.FileDescriptorProto source_file_descriptors = 17; - [[nodiscard]] int source_file_descriptors_size() - const; + [[nodiscard]] int source_file_descriptors_size() const; private: int _internal_source_file_descriptors_size() const; diff --git a/src/google/protobuf/cpp_features.pb.h b/src/google/protobuf/cpp_features.pb.h index ab8f26be9ba06..2537e07fcae1b 100644 --- a/src/google/protobuf/cpp_features.pb.h +++ b/src/google/protobuf/cpp_features.pb.h @@ -368,8 +368,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFeatures final : kRepeatedTypeFieldNumber = 4, }; // optional .pb.CppFeatures.StringType string_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_string_type() - const; + [[nodiscard]] bool has_string_type() const; void clear_string_type() ; [[nodiscard]] ::pb::CppFeatures_StringType string_type() const; void set_string_type(::pb::CppFeatures_StringType value); @@ -380,8 +379,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFeatures final : public: // optional bool legacy_closed_enum = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_legacy_closed_enum() - const; + [[nodiscard]] bool has_legacy_closed_enum() const; void clear_legacy_closed_enum() ; [[nodiscard]] bool legacy_closed_enum() const; void set_legacy_closed_enum(bool value); @@ -392,8 +390,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFeatures final : public: // optional bool enum_name_uses_string_view = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_enum_name_uses_string_view() - const; + [[nodiscard]] bool has_enum_name_uses_string_view() const; void clear_enum_name_uses_string_view() ; [[nodiscard]] bool enum_name_uses_string_view() const; void set_enum_name_uses_string_view(bool value); @@ -404,8 +401,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED CppFeatures final : public: // optional .pb.CppFeatures.RepeatedType repeated_type = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_repeated_type() - const; + [[nodiscard]] bool has_repeated_type() const; void clear_repeated_type() ; [[nodiscard]] ::pb::CppFeatures_RepeatedType repeated_type() const; void set_repeated_type(::pb::CppFeatures_RepeatedType value); diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 6ac12a668cdd8..2b1502c42654d 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -7843,10 +7843,9 @@ ::uint8_t* PROTOBUF_NONNULL FileDescriptorSet::_InternalSerialize( this_._internal_file_size()); i < n; i++) { const auto& repfield = this_._internal_file().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -8039,12 +8038,12 @@ FileDescriptorProto::FileDescriptorProto( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000800U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.options_) - : nullptr; - _impl_.source_code_info_ = (CheckHasBit(cached_has_bits, 0x00001000U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.source_code_info_) - : nullptr; + _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000800U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.options_) + : nullptr; + _impl_.source_code_info_ = (CheckHasBit(cached_has_bits, 0x00001000U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.source_code_info_) + : nullptr; _impl_.edition_ = from._impl_.edition_; // @@protoc_insertion_point(copy_constructor:google.protobuf.FileDescriptorProto) @@ -8253,10 +8252,9 @@ ::uint8_t* PROTOBUF_NONNULL FileDescriptorProto::_InternalSerialize( this_._internal_message_type_size()); i < n; i++) { const auto& repfield = this_._internal_message_type().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -8266,10 +8264,9 @@ ::uint8_t* PROTOBUF_NONNULL FileDescriptorProto::_InternalSerialize( this_._internal_enum_type_size()); i < n; i++) { const auto& repfield = this_._internal_enum_type().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -8279,10 +8276,9 @@ ::uint8_t* PROTOBUF_NONNULL FileDescriptorProto::_InternalSerialize( this_._internal_service_size()); i < n; i++) { const auto& repfield = this_._internal_service().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 6, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -8292,10 +8288,9 @@ ::uint8_t* PROTOBUF_NONNULL FileDescriptorProto::_InternalSerialize( this_._internal_extension_size()); i < n; i++) { const auto& repfield = this_._internal_extension().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 7, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -8651,9 +8646,9 @@ DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000001U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.options_) - : nullptr; + _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000001U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.options_) + : nullptr; ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, start_), reinterpret_cast(&from._impl_) + @@ -9197,9 +9192,9 @@ DescriptorProto::DescriptorProto( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000200U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.options_) - : nullptr; + _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000200U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.options_) + : nullptr; _impl_.visibility_ = from._impl_.visibility_; // @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto) @@ -9379,10 +9374,9 @@ ::uint8_t* PROTOBUF_NONNULL DescriptorProto::_InternalSerialize( this_._internal_field_size()); i < n; i++) { const auto& repfield = this_._internal_field().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -9392,10 +9386,9 @@ ::uint8_t* PROTOBUF_NONNULL DescriptorProto::_InternalSerialize( this_._internal_nested_type_size()); i < n; i++) { const auto& repfield = this_._internal_nested_type().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 3, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -9405,10 +9398,9 @@ ::uint8_t* PROTOBUF_NONNULL DescriptorProto::_InternalSerialize( this_._internal_enum_type_size()); i < n; i++) { const auto& repfield = this_._internal_enum_type().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -9418,10 +9410,9 @@ ::uint8_t* PROTOBUF_NONNULL DescriptorProto::_InternalSerialize( this_._internal_extension_range_size()); i < n; i++) { const auto& repfield = this_._internal_extension_range().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -9431,10 +9422,9 @@ ::uint8_t* PROTOBUF_NONNULL DescriptorProto::_InternalSerialize( this_._internal_extension_size()); i < n; i++) { const auto& repfield = this_._internal_extension().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 6, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -9451,10 +9441,9 @@ ::uint8_t* PROTOBUF_NONNULL DescriptorProto::_InternalSerialize( this_._internal_oneof_decl_size()); i < n; i++) { const auto& repfield = this_._internal_oneof_decl().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 8, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -9464,10 +9453,9 @@ ::uint8_t* PROTOBUF_NONNULL DescriptorProto::_InternalSerialize( this_._internal_reserved_range_size()); i < n; i++) { const auto& repfield = this_._internal_reserved_range().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 9, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -10059,9 +10047,9 @@ ExtensionRangeOptions::ExtensionRangeOptions( _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_, from.GetArena()); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000004U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.features_) - : nullptr; + _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000004U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.features_) + : nullptr; _impl_.verification_ = from._impl_.verification_; // @@protoc_insertion_point(copy_constructor:google.protobuf.ExtensionRangeOptions) @@ -10179,10 +10167,9 @@ ::uint8_t* PROTOBUF_NONNULL ExtensionRangeOptions::_InternalSerialize( this_._internal_declaration_size()); i < n; i++) { const auto& repfield = this_._internal_declaration().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -10209,10 +10196,9 @@ ::uint8_t* PROTOBUF_NONNULL ExtensionRangeOptions::_InternalSerialize( this_._internal_uninterpreted_option_size()); i < n; i++) { const auto& repfield = this_._internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -10396,9 +10382,9 @@ FieldDescriptorProto::FieldDescriptorProto( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000020U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.options_) - : nullptr; + _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000020U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.options_) + : nullptr; ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, number_), reinterpret_cast(&from._impl_) + @@ -10825,9 +10811,9 @@ OneofDescriptorProto::OneofDescriptorProto( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000002U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.options_) - : nullptr; + _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000002U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.options_) + : nullptr; // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofDescriptorProto) } @@ -11307,9 +11293,9 @@ EnumDescriptorProto::EnumDescriptorProto( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000010U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.options_) - : nullptr; + _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000010U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.options_) + : nullptr; _impl_.visibility_ = from._impl_.visibility_; // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumDescriptorProto) @@ -11447,10 +11433,9 @@ ::uint8_t* PROTOBUF_NONNULL EnumDescriptorProto::_InternalSerialize( this_._internal_value_size()); i < n; i++) { const auto& repfield = this_._internal_value().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -11467,10 +11452,9 @@ ::uint8_t* PROTOBUF_NONNULL EnumDescriptorProto::_InternalSerialize( this_._internal_reserved_range_size()); i < n; i++) { const auto& repfield = this_._internal_reserved_range().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 4, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -11680,9 +11664,9 @@ EnumValueDescriptorProto::EnumValueDescriptorProto( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000002U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.options_) - : nullptr; + _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000002U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.options_) + : nullptr; _impl_.number_ = from._impl_.number_; // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueDescriptorProto) @@ -11959,9 +11943,9 @@ ServiceDescriptorProto::ServiceDescriptorProto( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000004U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.options_) - : nullptr; + _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000004U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.options_) + : nullptr; // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceDescriptorProto) } @@ -12076,10 +12060,9 @@ ::uint8_t* PROTOBUF_NONNULL ServiceDescriptorProto::_InternalSerialize( this_._internal_method_size()); i < n; i++) { const auto& repfield = this_._internal_method().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -12242,9 +12225,9 @@ MethodDescriptorProto::MethodDescriptorProto( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000008U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.options_) - : nullptr; + _impl_.options_ = (CheckHasBit(cached_has_bits, 0x00000008U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.options_) + : nullptr; ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, client_streaming_), reinterpret_cast(&from._impl_) + @@ -12588,9 +12571,9 @@ FileOptions::FileOptions( _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_, from.GetArena()); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000400U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.features_) - : nullptr; + _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000400U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.features_) + : nullptr; ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, java_multiple_files_), reinterpret_cast(&from._impl_) + @@ -12908,10 +12891,9 @@ ::uint8_t* PROTOBUF_NONNULL FileOptions::_InternalSerialize( this_._internal_uninterpreted_option_size()); i < n; i++) { const auto& repfield = this_._internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -13214,9 +13196,9 @@ MessageOptions::MessageOptions( _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_, from.GetArena()); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000001U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.features_) - : nullptr; + _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000001U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.features_) + : nullptr; ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, message_set_wire_format_), reinterpret_cast(&from._impl_) + @@ -13383,10 +13365,9 @@ ::uint8_t* PROTOBUF_NONNULL MessageOptions::_InternalSerialize( this_._internal_uninterpreted_option_size()); i < n; i++) { const auto& repfield = this_._internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -14102,12 +14083,12 @@ FieldOptions::FieldOptions( _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_, from.GetArena()); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000004U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.features_) - : nullptr; - _impl_.feature_support_ = (CheckHasBit(cached_has_bits, 0x00000008U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.feature_support_) - : nullptr; + _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000004U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.features_) + : nullptr; + _impl_.feature_support_ = (CheckHasBit(cached_has_bits, 0x00000008U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.feature_support_) + : nullptr; ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, ctype_), reinterpret_cast(&from._impl_) + @@ -14330,10 +14311,9 @@ ::uint8_t* PROTOBUF_NONNULL FieldOptions::_InternalSerialize( this_._internal_edition_defaults_size()); i < n; i++) { const auto& repfield = this_._internal_edition_defaults().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 20, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 20, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -14360,10 +14340,9 @@ ::uint8_t* PROTOBUF_NONNULL FieldOptions::_InternalSerialize( this_._internal_uninterpreted_option_size()); i < n; i++) { const auto& repfield = this_._internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -14618,9 +14597,9 @@ OneofOptions::OneofOptions( _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_, from.GetArena()); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000002U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.features_) - : nullptr; + _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000002U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.features_) + : nullptr; // @@protoc_insertion_point(copy_constructor:google.protobuf.OneofOptions) } @@ -14737,10 +14716,9 @@ ::uint8_t* PROTOBUF_NONNULL OneofOptions::_InternalSerialize( this_._internal_uninterpreted_option_size()); i < n; i++) { const auto& repfield = this_._internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -14904,9 +14882,9 @@ EnumOptions::EnumOptions( _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_, from.GetArena()); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000001U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.features_) - : nullptr; + _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000001U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.features_) + : nullptr; ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, allow_alias_), reinterpret_cast(&from._impl_) + @@ -15057,10 +15035,9 @@ ::uint8_t* PROTOBUF_NONNULL EnumOptions::_InternalSerialize( this_._internal_uninterpreted_option_size()); i < n; i++) { const auto& repfield = this_._internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -15239,12 +15216,12 @@ EnumValueOptions::EnumValueOptions( _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_, from.GetArena()); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000002U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.features_) - : nullptr; - _impl_.feature_support_ = (CheckHasBit(cached_has_bits, 0x00000004U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.feature_support_) - : nullptr; + _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000002U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.features_) + : nullptr; + _impl_.feature_support_ = (CheckHasBit(cached_has_bits, 0x00000004U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.feature_support_) + : nullptr; ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, deprecated_), reinterpret_cast(&from._impl_) + @@ -15402,10 +15379,9 @@ ::uint8_t* PROTOBUF_NONNULL EnumValueOptions::_InternalSerialize( this_._internal_uninterpreted_option_size()); i < n; i++) { const auto& repfield = this_._internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -15594,9 +15570,9 @@ ServiceOptions::ServiceOptions( _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_, from.GetArena()); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000002U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.features_) - : nullptr; + _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000002U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.features_) + : nullptr; _impl_.deprecated_ = from._impl_.deprecated_; // @@protoc_insertion_point(copy_constructor:google.protobuf.ServiceOptions) @@ -15727,10 +15703,9 @@ ::uint8_t* PROTOBUF_NONNULL ServiceOptions::_InternalSerialize( this_._internal_uninterpreted_option_size()); i < n; i++) { const auto& repfield = this_._internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -15903,9 +15878,9 @@ MethodOptions::MethodOptions( _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_, from.GetArena()); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000002U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.features_) - : nullptr; + _impl_.features_ = (CheckHasBit(cached_has_bits, 0x00000002U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.features_) + : nullptr; ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, deprecated_), reinterpret_cast(&from._impl_) + @@ -16053,10 +16028,9 @@ ::uint8_t* PROTOBUF_NONNULL MethodOptions::_InternalSerialize( this_._internal_uninterpreted_option_size()); i < n; i++) { const auto& repfield = this_._internal_uninterpreted_option().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 999, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 999, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -16591,10 +16565,9 @@ ::uint8_t* PROTOBUF_NONNULL UninterpretedOption::_InternalSerialize( this_._internal_name_size()); i < n; i++) { const auto& repfield = this_._internal_name().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -17224,12 +17197,12 @@ FeatureSetDefaults_FeatureSetEditionDefault::FeatureSetDefaults_FeatureSetEditio from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.overridable_features_ = (CheckHasBit(cached_has_bits, 0x00000001U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.overridable_features_) - : nullptr; - _impl_.fixed_features_ = (CheckHasBit(cached_has_bits, 0x00000002U)) - ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.fixed_features_) - : nullptr; + _impl_.overridable_features_ = (CheckHasBit(cached_has_bits, 0x00000001U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.overridable_features_) + : nullptr; + _impl_.fixed_features_ = (CheckHasBit(cached_has_bits, 0x00000002U)) ? ::google::protobuf::Message::CopyConstruct( + arena, *from._impl_.fixed_features_) + : nullptr; _impl_.edition_ = from._impl_.edition_; // @@protoc_insertion_point(copy_constructor:google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) @@ -17624,10 +17597,9 @@ ::uint8_t* PROTOBUF_NONNULL FeatureSetDefaults::_InternalSerialize( this_._internal_defaults_size()); i < n; i++) { const auto& repfield = this_._internal_defaults().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -18235,10 +18207,9 @@ ::uint8_t* PROTOBUF_NONNULL SourceCodeInfo::_InternalSerialize( this_._internal_location_size()); i < n; i++) { const auto& repfield = this_._internal_location().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), target, + stream); } } @@ -18782,10 +18753,9 @@ ::uint8_t* PROTOBUF_NONNULL GeneratedCodeInfo::_InternalSerialize( this_._internal_annotation_size()); i < n; i++) { const auto& repfield = this_._internal_annotation().Get(i); - target = - ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 1, repfield, repfield.GetCachedSize(), - target, stream); + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), target, + stream); } } diff --git a/src/google/protobuf/descriptor.pb.h b/src/google/protobuf/descriptor.pb.h index c7f50126e1cce..cd08a1da3a242 100644 --- a/src/google/protobuf/descriptor.pb.h +++ b/src/google/protobuf/descriptor.pb.h @@ -1374,8 +1374,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED UninterpretedOption kIsExtensionFieldNumber = 2, }; // required string name_part = 1; - [[nodiscard]] bool has_name_part() - const; + [[nodiscard]] bool has_name_part() const; void clear_name_part() ; [[nodiscard]] const ::std::string& name_part() const; template @@ -1391,8 +1390,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED UninterpretedOption public: // required bool is_extension = 2; - [[nodiscard]] bool has_is_extension() - const; + [[nodiscard]] bool has_is_extension() const; void clear_is_extension() ; [[nodiscard]] bool is_extension() const; void set_is_extension(bool value); @@ -1599,8 +1597,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED SourceCodeInfo_Loca kTrailingCommentsFieldNumber = 4, }; // repeated int32 path = 1 [packed = true]; - [[nodiscard]] int path_size() - const; + [[nodiscard]] int path_size() const; private: int _internal_path_size() const; @@ -1619,8 +1616,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED SourceCodeInfo_Loca public: // repeated int32 span = 2 [packed = true]; - [[nodiscard]] int span_size() - const; + [[nodiscard]] int span_size() const; private: int _internal_span_size() const; @@ -1639,8 +1635,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED SourceCodeInfo_Loca public: // repeated string leading_detached_comments = 6; - [[nodiscard]] int leading_detached_comments_size() - const; + [[nodiscard]] int leading_detached_comments_size() const; private: int _internal_leading_detached_comments_size() const; @@ -1666,8 +1661,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED SourceCodeInfo_Loca public: // optional string leading_comments = 3; - [[nodiscard]] bool has_leading_comments() - const; + [[nodiscard]] bool has_leading_comments() const; void clear_leading_comments() ; [[nodiscard]] const ::std::string& leading_comments() const; template @@ -1683,8 +1677,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED SourceCodeInfo_Loca public: // optional string trailing_comments = 4; - [[nodiscard]] bool has_trailing_comments() - const; + [[nodiscard]] bool has_trailing_comments() const; void clear_trailing_comments() ; [[nodiscard]] const ::std::string& trailing_comments() const; template @@ -1922,8 +1915,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED GeneratedCodeInfo_A kSemanticFieldNumber = 5, }; // repeated int32 path = 1 [packed = true]; - [[nodiscard]] int path_size() - const; + [[nodiscard]] int path_size() const; private: int _internal_path_size() const; @@ -1942,8 +1934,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED GeneratedCodeInfo_A public: // optional string source_file = 2; - [[nodiscard]] bool has_source_file() - const; + [[nodiscard]] bool has_source_file() const; void clear_source_file() ; [[nodiscard]] const ::std::string& source_file() const; template @@ -1959,8 +1950,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED GeneratedCodeInfo_A public: // optional int32 begin = 3; - [[nodiscard]] bool has_begin() - const; + [[nodiscard]] bool has_begin() const; void clear_begin() ; [[nodiscard]] ::int32_t begin() const; void set_begin(::int32_t value); @@ -1971,8 +1961,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED GeneratedCodeInfo_A public: // optional int32 end = 4; - [[nodiscard]] bool has_end() - const; + [[nodiscard]] bool has_end() const; void clear_end() ; [[nodiscard]] ::int32_t end() const; void set_end(::int32_t value); @@ -1983,8 +1972,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED GeneratedCodeInfo_A public: // optional .google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; - [[nodiscard]] bool has_semantic() - const; + [[nodiscard]] bool has_semantic() const; void clear_semantic() ; [[nodiscard]] ::google::protobuf::GeneratedCodeInfo_Annotation_Semantic semantic() const; void set_semantic(::google::protobuf::GeneratedCodeInfo_Annotation_Semantic value); @@ -2195,8 +2183,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions_Featur kEditionRemovedFieldNumber = 4, }; // optional string deprecation_warning = 3; - [[nodiscard]] bool has_deprecation_warning() - const; + [[nodiscard]] bool has_deprecation_warning() const; void clear_deprecation_warning() ; [[nodiscard]] const ::std::string& deprecation_warning() const; template @@ -2212,8 +2199,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions_Featur public: // optional string removal_error = 5; - [[nodiscard]] bool has_removal_error() - const; + [[nodiscard]] bool has_removal_error() const; void clear_removal_error() ; [[nodiscard]] const ::std::string& removal_error() const; template @@ -2229,8 +2215,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions_Featur public: // optional .google.protobuf.Edition edition_introduced = 1; - [[nodiscard]] bool has_edition_introduced() - const; + [[nodiscard]] bool has_edition_introduced() const; void clear_edition_introduced() ; [[nodiscard]] ::google::protobuf::Edition edition_introduced() const; void set_edition_introduced(::google::protobuf::Edition value); @@ -2241,8 +2226,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions_Featur public: // optional .google.protobuf.Edition edition_deprecated = 2; - [[nodiscard]] bool has_edition_deprecated() - const; + [[nodiscard]] bool has_edition_deprecated() const; void clear_edition_deprecated() ; [[nodiscard]] ::google::protobuf::Edition edition_deprecated() const; void set_edition_deprecated(::google::protobuf::Edition value); @@ -2253,8 +2237,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions_Featur public: // optional .google.protobuf.Edition edition_removed = 4; - [[nodiscard]] bool has_edition_removed() - const; + [[nodiscard]] bool has_edition_removed() const; void clear_edition_removed() ; [[nodiscard]] ::google::protobuf::Edition edition_removed() const; void set_edition_removed(::google::protobuf::Edition value); @@ -2461,8 +2444,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions_Editio kEditionFieldNumber = 3, }; // optional string value = 2; - [[nodiscard]] bool has_value() - const; + [[nodiscard]] bool has_value() const; void clear_value() ; [[nodiscard]] const ::std::string& value() const; template @@ -2478,8 +2460,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions_Editio public: // optional .google.protobuf.Edition edition = 3; - [[nodiscard]] bool has_edition() - const; + [[nodiscard]] bool has_edition() const; void clear_edition() ; [[nodiscard]] ::google::protobuf::Edition edition() const; void set_edition(::google::protobuf::Edition value); @@ -3005,8 +2986,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSet final : kDefaultSymbolVisibilityFieldNumber = 8, }; // optional .google.protobuf.FeatureSet.FieldPresence field_presence = 1 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_field_presence() - const; + [[nodiscard]] bool has_field_presence() const; void clear_field_presence() ; [[nodiscard]] ::google::protobuf::FeatureSet_FieldPresence field_presence() const; void set_field_presence(::google::protobuf::FeatureSet_FieldPresence value); @@ -3017,8 +2997,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSet final : public: // optional .google.protobuf.FeatureSet.EnumType enum_type = 2 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_enum_type() - const; + [[nodiscard]] bool has_enum_type() const; void clear_enum_type() ; [[nodiscard]] ::google::protobuf::FeatureSet_EnumType enum_type() const; void set_enum_type(::google::protobuf::FeatureSet_EnumType value); @@ -3029,8 +3008,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSet final : public: // optional .google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_repeated_field_encoding() - const; + [[nodiscard]] bool has_repeated_field_encoding() const; void clear_repeated_field_encoding() ; [[nodiscard]] ::google::protobuf::FeatureSet_RepeatedFieldEncoding repeated_field_encoding() const; void set_repeated_field_encoding(::google::protobuf::FeatureSet_RepeatedFieldEncoding value); @@ -3041,8 +3019,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSet final : public: // optional .google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_utf8_validation() - const; + [[nodiscard]] bool has_utf8_validation() const; void clear_utf8_validation() ; [[nodiscard]] ::google::protobuf::FeatureSet_Utf8Validation utf8_validation() const; void set_utf8_validation(::google::protobuf::FeatureSet_Utf8Validation value); @@ -3053,8 +3030,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSet final : public: // optional .google.protobuf.FeatureSet.MessageEncoding message_encoding = 5 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_message_encoding() - const; + [[nodiscard]] bool has_message_encoding() const; void clear_message_encoding() ; [[nodiscard]] ::google::protobuf::FeatureSet_MessageEncoding message_encoding() const; void set_message_encoding(::google::protobuf::FeatureSet_MessageEncoding value); @@ -3065,8 +3041,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSet final : public: // optional .google.protobuf.FeatureSet.JsonFormat json_format = 6 [retention = RETENTION_RUNTIME, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_json_format() - const; + [[nodiscard]] bool has_json_format() const; void clear_json_format() ; [[nodiscard]] ::google::protobuf::FeatureSet_JsonFormat json_format() const; void set_json_format(::google::protobuf::FeatureSet_JsonFormat value); @@ -3077,8 +3052,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSet final : public: // optional .google.protobuf.FeatureSet.EnforceNamingStyle enforce_naming_style = 7 [retention = RETENTION_SOURCE, targets = TARGET_TYPE_FILE, targets = TARGET_TYPE_EXTENSION_RANGE, targets = TARGET_TYPE_MESSAGE, targets = TARGET_TYPE_FIELD, targets = TARGET_TYPE_ONEOF, targets = TARGET_TYPE_ENUM, targets = TARGET_TYPE_ENUM_ENTRY, targets = TARGET_TYPE_SERVICE, targets = TARGET_TYPE_METHOD, edition_defaults = { - [[nodiscard]] bool has_enforce_naming_style() - const; + [[nodiscard]] bool has_enforce_naming_style() const; void clear_enforce_naming_style() ; [[nodiscard]] ::google::protobuf::FeatureSet_EnforceNamingStyle enforce_naming_style() const; void set_enforce_naming_style(::google::protobuf::FeatureSet_EnforceNamingStyle value); @@ -3089,8 +3063,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSet final : public: // optional .google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = 8 [retention = RETENTION_SOURCE, targets = TARGET_TYPE_FILE, edition_defaults = { - [[nodiscard]] bool has_default_symbol_visibility() - const; + [[nodiscard]] bool has_default_symbol_visibility() const; void clear_default_symbol_visibility() ; [[nodiscard]] ::google::protobuf::FeatureSet_VisibilityFeature_DefaultSymbolVisibility default_symbol_visibility() const; void set_default_symbol_visibility(::google::protobuf::FeatureSet_VisibilityFeature_DefaultSymbolVisibility value); @@ -3494,8 +3467,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ExtensionRangeOptio kRepeatedFieldNumber = 6, }; // optional string full_name = 2; - [[nodiscard]] bool has_full_name() - const; + [[nodiscard]] bool has_full_name() const; void clear_full_name() ; [[nodiscard]] const ::std::string& full_name() const; template @@ -3511,8 +3483,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ExtensionRangeOptio public: // optional string type = 3; - [[nodiscard]] bool has_type() - const; + [[nodiscard]] bool has_type() const; void clear_type() ; [[nodiscard]] const ::std::string& type() const; template @@ -3528,8 +3499,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ExtensionRangeOptio public: // optional int32 number = 1; - [[nodiscard]] bool has_number() - const; + [[nodiscard]] bool has_number() const; void clear_number() ; [[nodiscard]] ::int32_t number() const; void set_number(::int32_t value); @@ -3540,8 +3510,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ExtensionRangeOptio public: // optional bool reserved = 5; - [[nodiscard]] bool has_reserved() - const; + [[nodiscard]] bool has_reserved() const; void clear_reserved() ; [[nodiscard]] bool reserved() const; void set_reserved(bool value); @@ -3552,8 +3521,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ExtensionRangeOptio public: // optional bool repeated = 6; - [[nodiscard]] bool has_repeated() - const; + [[nodiscard]] bool has_repeated() const; void clear_repeated() ; [[nodiscard]] bool repeated() const; void set_repeated(bool value); @@ -3760,8 +3728,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumDescriptorProto kEndFieldNumber = 2, }; // optional int32 start = 1; - [[nodiscard]] bool has_start() - const; + [[nodiscard]] bool has_start() const; void clear_start() ; [[nodiscard]] ::int32_t start() const; void set_start(::int32_t value); @@ -3772,8 +3739,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumDescriptorProto public: // optional int32 end = 2; - [[nodiscard]] bool has_end() - const; + [[nodiscard]] bool has_end() const; void clear_end() ; [[nodiscard]] ::int32_t end() const; void set_end(::int32_t value); @@ -3977,8 +3943,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto_Res kEndFieldNumber = 2, }; // optional int32 start = 1; - [[nodiscard]] bool has_start() - const; + [[nodiscard]] bool has_start() const; void clear_start() ; [[nodiscard]] ::int32_t start() const; void set_start(::int32_t value); @@ -3989,8 +3954,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto_Res public: // optional int32 end = 2; - [[nodiscard]] bool has_end() - const; + [[nodiscard]] bool has_end() const; void clear_end() ; [[nodiscard]] ::int32_t end() const; void set_end(::int32_t value); @@ -4205,8 +4169,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED UninterpretedOption kDoubleValueFieldNumber = 6, }; // repeated .google.protobuf.UninterpretedOption.NamePart name = 2; - [[nodiscard]] int name_size() - const; + [[nodiscard]] int name_size() const; private: int _internal_name_size() const; @@ -4226,8 +4189,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED UninterpretedOption public: // optional string identifier_value = 3; - [[nodiscard]] bool has_identifier_value() - const; + [[nodiscard]] bool has_identifier_value() const; void clear_identifier_value() ; [[nodiscard]] const ::std::string& identifier_value() const; template @@ -4243,8 +4205,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED UninterpretedOption public: // optional bytes string_value = 7; - [[nodiscard]] bool has_string_value() - const; + [[nodiscard]] bool has_string_value() const; void clear_string_value() ; [[nodiscard]] const ::std::string& string_value() const; template @@ -4260,8 +4221,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED UninterpretedOption public: // optional string aggregate_value = 8; - [[nodiscard]] bool has_aggregate_value() - const; + [[nodiscard]] bool has_aggregate_value() const; void clear_aggregate_value() ; [[nodiscard]] const ::std::string& aggregate_value() const; template @@ -4277,8 +4237,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED UninterpretedOption public: // optional uint64 positive_int_value = 4; - [[nodiscard]] bool has_positive_int_value() - const; + [[nodiscard]] bool has_positive_int_value() const; void clear_positive_int_value() ; [[nodiscard]] ::uint64_t positive_int_value() const; void set_positive_int_value(::uint64_t value); @@ -4289,8 +4248,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED UninterpretedOption public: // optional int64 negative_int_value = 5; - [[nodiscard]] bool has_negative_int_value() - const; + [[nodiscard]] bool has_negative_int_value() const; void clear_negative_int_value() ; [[nodiscard]] ::int64_t negative_int_value() const; void set_negative_int_value(::int64_t value); @@ -4301,8 +4259,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED UninterpretedOption public: // optional double double_value = 6; - [[nodiscard]] bool has_double_value() - const; + [[nodiscard]] bool has_double_value() const; void clear_double_value() ; [[nodiscard]] double double_value() const; void set_double_value(double value); @@ -4516,8 +4473,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED SourceCodeInfo fina kLocationFieldNumber = 1, }; // repeated .google.protobuf.SourceCodeInfo.Location location = 1; - [[nodiscard]] int location_size() - const; + [[nodiscard]] int location_size() const; private: int _internal_location_size() const; @@ -4920,8 +4876,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED GeneratedCodeInfo f kAnnotationFieldNumber = 1, }; // repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - [[nodiscard]] int annotation_size() - const; + [[nodiscard]] int annotation_size() const; private: int _internal_annotation_size() const; @@ -5139,8 +5094,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSetDefaults_ kEditionFieldNumber = 3, }; // optional .google.protobuf.FeatureSet overridable_features = 4; - [[nodiscard]] bool has_overridable_features() - const; + [[nodiscard]] bool has_overridable_features() const; void clear_overridable_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& overridable_features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_overridable_features(); @@ -5155,8 +5109,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSetDefaults_ public: // optional .google.protobuf.FeatureSet fixed_features = 5; - [[nodiscard]] bool has_fixed_features() - const; + [[nodiscard]] bool has_fixed_features() const; void clear_fixed_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& fixed_features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_fixed_features(); @@ -5171,8 +5124,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSetDefaults_ public: // optional .google.protobuf.Edition edition = 3; - [[nodiscard]] bool has_edition() - const; + [[nodiscard]] bool has_edition() const; void clear_edition() ; [[nodiscard]] ::google::protobuf::Edition edition() const; void set_edition(::google::protobuf::Edition value); @@ -5383,8 +5335,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ServiceOptions fina kDeprecatedFieldNumber = 33, }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - [[nodiscard]] int uninterpreted_option_size() - const; + [[nodiscard]] int uninterpreted_option_size() const; private: int _internal_uninterpreted_option_size() const; @@ -5404,8 +5355,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ServiceOptions fina public: // optional .google.protobuf.FeatureSet features = 34; - [[nodiscard]] bool has_features() - const; + [[nodiscard]] bool has_features() const; void clear_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_features(); @@ -5420,8 +5370,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ServiceOptions fina public: // optional bool deprecated = 33 [default = false]; - [[nodiscard]] bool has_deprecated() - const; + [[nodiscard]] bool has_deprecated() const; void clear_deprecated() ; [[nodiscard]] bool deprecated() const; void set_deprecated(bool value); @@ -5822,8 +5771,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED OneofOptions final kFeaturesFieldNumber = 1, }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - [[nodiscard]] int uninterpreted_option_size() - const; + [[nodiscard]] int uninterpreted_option_size() const; private: int _internal_uninterpreted_option_size() const; @@ -5843,8 +5791,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED OneofOptions final public: // optional .google.protobuf.FeatureSet features = 1; - [[nodiscard]] bool has_features() - const; + [[nodiscard]] bool has_features() const; void clear_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_features(); @@ -6271,8 +6218,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MethodOptions final kIdempotencyLevelFieldNumber = 34, }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - [[nodiscard]] int uninterpreted_option_size() - const; + [[nodiscard]] int uninterpreted_option_size() const; private: int _internal_uninterpreted_option_size() const; @@ -6292,8 +6238,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MethodOptions final public: // optional .google.protobuf.FeatureSet features = 35; - [[nodiscard]] bool has_features() - const; + [[nodiscard]] bool has_features() const; void clear_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_features(); @@ -6308,8 +6253,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MethodOptions final public: // optional bool deprecated = 33 [default = false]; - [[nodiscard]] bool has_deprecated() - const; + [[nodiscard]] bool has_deprecated() const; void clear_deprecated() ; [[nodiscard]] bool deprecated() const; void set_deprecated(bool value); @@ -6320,8 +6264,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MethodOptions final public: // optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; - [[nodiscard]] bool has_idempotency_level() - const; + [[nodiscard]] bool has_idempotency_level() const; void clear_idempotency_level() ; [[nodiscard]] ::google::protobuf::MethodOptions_IdempotencyLevel idempotency_level() const; void set_idempotency_level(::google::protobuf::MethodOptions_IdempotencyLevel value); @@ -6728,8 +6671,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MessageOptions fina kUninterpretedOptionFieldNumber = 999, }; // optional .google.protobuf.FeatureSet features = 12; - [[nodiscard]] bool has_features() - const; + [[nodiscard]] bool has_features() const; void clear_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_features(); @@ -6744,8 +6686,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MessageOptions fina public: // optional bool message_set_wire_format = 1 [default = false]; - [[nodiscard]] bool has_message_set_wire_format() - const; + [[nodiscard]] bool has_message_set_wire_format() const; void clear_message_set_wire_format() ; [[nodiscard]] bool message_set_wire_format() const; void set_message_set_wire_format(bool value); @@ -6756,8 +6697,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MessageOptions fina public: // optional bool no_standard_descriptor_accessor = 2 [default = false]; - [[nodiscard]] bool has_no_standard_descriptor_accessor() - const; + [[nodiscard]] bool has_no_standard_descriptor_accessor() const; void clear_no_standard_descriptor_accessor() ; [[nodiscard]] bool no_standard_descriptor_accessor() const; void set_no_standard_descriptor_accessor(bool value); @@ -6768,8 +6708,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MessageOptions fina public: // optional bool deprecated = 3 [default = false]; - [[nodiscard]] bool has_deprecated() - const; + [[nodiscard]] bool has_deprecated() const; void clear_deprecated() ; [[nodiscard]] bool deprecated() const; void set_deprecated(bool value); @@ -6780,8 +6719,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MessageOptions fina public: // optional bool map_entry = 7; - [[nodiscard]] bool has_map_entry() - const; + [[nodiscard]] bool has_map_entry() const; void clear_map_entry() ; [[nodiscard]] bool map_entry() const; void set_map_entry(bool value); @@ -6792,8 +6730,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MessageOptions fina public: // optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; - [[nodiscard]] [[deprecated]] bool has_deprecated_legacy_json_field_conflicts() - const; + [[nodiscard]] [[deprecated]] bool has_deprecated_legacy_json_field_conflicts() const; [[deprecated]] void clear_deprecated_legacy_json_field_conflicts() ; [[nodiscard]] [[deprecated]] bool deprecated_legacy_json_field_conflicts() const; [[deprecated]] void set_deprecated_legacy_json_field_conflicts(bool value); @@ -6804,8 +6741,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MessageOptions fina public: // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - [[nodiscard]] int uninterpreted_option_size() - const; + [[nodiscard]] int uninterpreted_option_size() const; private: int _internal_uninterpreted_option_size() const; @@ -7259,8 +7195,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : kUninterpretedOptionFieldNumber = 999, }; // optional string java_package = 1; - [[nodiscard]] bool has_java_package() - const; + [[nodiscard]] bool has_java_package() const; void clear_java_package() ; [[nodiscard]] const ::std::string& java_package() const; template @@ -7276,8 +7211,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional string java_outer_classname = 8; - [[nodiscard]] bool has_java_outer_classname() - const; + [[nodiscard]] bool has_java_outer_classname() const; void clear_java_outer_classname() ; [[nodiscard]] const ::std::string& java_outer_classname() const; template @@ -7293,8 +7227,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional string go_package = 11; - [[nodiscard]] bool has_go_package() - const; + [[nodiscard]] bool has_go_package() const; void clear_go_package() ; [[nodiscard]] const ::std::string& go_package() const; template @@ -7310,8 +7243,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional string objc_class_prefix = 36; - [[nodiscard]] bool has_objc_class_prefix() - const; + [[nodiscard]] bool has_objc_class_prefix() const; void clear_objc_class_prefix() ; [[nodiscard]] const ::std::string& objc_class_prefix() const; template @@ -7327,8 +7259,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional string csharp_namespace = 37; - [[nodiscard]] bool has_csharp_namespace() - const; + [[nodiscard]] bool has_csharp_namespace() const; void clear_csharp_namespace() ; [[nodiscard]] const ::std::string& csharp_namespace() const; template @@ -7344,8 +7275,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional string swift_prefix = 39; - [[nodiscard]] bool has_swift_prefix() - const; + [[nodiscard]] bool has_swift_prefix() const; void clear_swift_prefix() ; [[nodiscard]] const ::std::string& swift_prefix() const; template @@ -7361,8 +7291,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional string php_class_prefix = 40; - [[nodiscard]] bool has_php_class_prefix() - const; + [[nodiscard]] bool has_php_class_prefix() const; void clear_php_class_prefix() ; [[nodiscard]] const ::std::string& php_class_prefix() const; template @@ -7378,8 +7307,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional string php_namespace = 41; - [[nodiscard]] bool has_php_namespace() - const; + [[nodiscard]] bool has_php_namespace() const; void clear_php_namespace() ; [[nodiscard]] const ::std::string& php_namespace() const; template @@ -7395,8 +7323,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional string php_metadata_namespace = 44; - [[nodiscard]] bool has_php_metadata_namespace() - const; + [[nodiscard]] bool has_php_metadata_namespace() const; void clear_php_metadata_namespace() ; [[nodiscard]] const ::std::string& php_metadata_namespace() const; template @@ -7412,8 +7339,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional string ruby_package = 45; - [[nodiscard]] bool has_ruby_package() - const; + [[nodiscard]] bool has_ruby_package() const; void clear_ruby_package() ; [[nodiscard]] const ::std::string& ruby_package() const; template @@ -7429,8 +7355,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional .google.protobuf.FeatureSet features = 50; - [[nodiscard]] bool has_features() - const; + [[nodiscard]] bool has_features() const; void clear_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_features(); @@ -7445,8 +7370,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional bool java_multiple_files = 10 [default = false, feature_support = { - [[nodiscard]] bool has_java_multiple_files() - const; + [[nodiscard]] bool has_java_multiple_files() const; void clear_java_multiple_files() ; [[nodiscard]] bool java_multiple_files() const; void set_java_multiple_files(bool value); @@ -7457,8 +7381,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional bool cc_generic_services = 16 [default = false]; - [[nodiscard]] bool has_cc_generic_services() - const; + [[nodiscard]] bool has_cc_generic_services() const; void clear_cc_generic_services() ; [[nodiscard]] bool cc_generic_services() const; void set_cc_generic_services(bool value); @@ -7469,8 +7392,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional bool java_generic_services = 17 [default = false]; - [[nodiscard]] bool has_java_generic_services() - const; + [[nodiscard]] bool has_java_generic_services() const; void clear_java_generic_services() ; [[nodiscard]] bool java_generic_services() const; void set_java_generic_services(bool value); @@ -7481,8 +7403,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional bool py_generic_services = 18 [default = false]; - [[nodiscard]] bool has_py_generic_services() - const; + [[nodiscard]] bool has_py_generic_services() const; void clear_py_generic_services() ; [[nodiscard]] bool py_generic_services() const; void set_py_generic_services(bool value); @@ -7493,8 +7414,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional bool java_generate_equals_and_hash = 20 [deprecated = true]; - [[nodiscard]] [[deprecated]] bool has_java_generate_equals_and_hash() - const; + [[nodiscard]] [[deprecated]] bool has_java_generate_equals_and_hash() const; [[deprecated]] void clear_java_generate_equals_and_hash() ; [[nodiscard]] [[deprecated]] bool java_generate_equals_and_hash() const; [[deprecated]] void set_java_generate_equals_and_hash(bool value); @@ -7505,8 +7425,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional bool deprecated = 23 [default = false]; - [[nodiscard]] bool has_deprecated() - const; + [[nodiscard]] bool has_deprecated() const; void clear_deprecated() ; [[nodiscard]] bool deprecated() const; void set_deprecated(bool value); @@ -7517,8 +7436,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional bool java_string_check_utf8 = 27 [default = false]; - [[nodiscard]] bool has_java_string_check_utf8() - const; + [[nodiscard]] bool has_java_string_check_utf8() const; void clear_java_string_check_utf8() ; [[nodiscard]] bool java_string_check_utf8() const; void set_java_string_check_utf8(bool value); @@ -7529,8 +7447,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED]; - [[nodiscard]] bool has_optimize_for() - const; + [[nodiscard]] bool has_optimize_for() const; void clear_optimize_for() ; [[nodiscard]] ::google::protobuf::FileOptions_OptimizeMode optimize_for() const; void set_optimize_for(::google::protobuf::FileOptions_OptimizeMode value); @@ -7541,8 +7458,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // optional bool cc_enable_arenas = 31 [default = true]; - [[nodiscard]] bool has_cc_enable_arenas() - const; + [[nodiscard]] bool has_cc_enable_arenas() const; void clear_cc_enable_arenas() ; [[nodiscard]] bool cc_enable_arenas() const; void set_cc_enable_arenas(bool value); @@ -7553,8 +7469,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileOptions final : public: // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - [[nodiscard]] int uninterpreted_option_size() - const; + [[nodiscard]] int uninterpreted_option_size() const; private: int _internal_uninterpreted_option_size() const; @@ -8087,8 +8002,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final kTargetsFieldNumber = 19, }; // repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; - [[nodiscard]] int edition_defaults_size() - const; + [[nodiscard]] int edition_defaults_size() const; private: int _internal_edition_defaults_size() const; @@ -8108,8 +8022,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - [[nodiscard]] int uninterpreted_option_size() - const; + [[nodiscard]] int uninterpreted_option_size() const; private: int _internal_uninterpreted_option_size() const; @@ -8129,8 +8042,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional .google.protobuf.FeatureSet features = 21; - [[nodiscard]] bool has_features() - const; + [[nodiscard]] bool has_features() const; void clear_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_features(); @@ -8145,8 +8057,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22; - [[nodiscard]] bool has_feature_support() - const; + [[nodiscard]] bool has_feature_support() const; void clear_feature_support() ; [[nodiscard]] const ::google::protobuf::FieldOptions_FeatureSupport& feature_support() const; [[nodiscard]] ::google::protobuf::FieldOptions_FeatureSupport* PROTOBUF_NULLABLE release_feature_support(); @@ -8161,8 +8072,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; - [[nodiscard]] bool has_ctype() - const; + [[nodiscard]] bool has_ctype() const; void clear_ctype() ; [[nodiscard]] ::google::protobuf::FieldOptions_CType ctype() const; void set_ctype(::google::protobuf::FieldOptions_CType value); @@ -8173,8 +8083,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional bool packed = 2; - [[nodiscard]] bool has_packed() - const; + [[nodiscard]] bool has_packed() const; void clear_packed() ; [[nodiscard]] bool packed() const; void set_packed(bool value); @@ -8185,8 +8094,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional bool deprecated = 3 [default = false]; - [[nodiscard]] bool has_deprecated() - const; + [[nodiscard]] bool has_deprecated() const; void clear_deprecated() ; [[nodiscard]] bool deprecated() const; void set_deprecated(bool value); @@ -8197,8 +8105,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional bool lazy = 5 [default = false]; - [[nodiscard]] bool has_lazy() - const; + [[nodiscard]] bool has_lazy() const; void clear_lazy() ; [[nodiscard]] bool lazy() const; void set_lazy(bool value); @@ -8209,8 +8116,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional bool weak = 10 [default = false, deprecated = true]; - [[nodiscard]] [[deprecated]] bool has_weak() - const; + [[nodiscard]] [[deprecated]] bool has_weak() const; [[deprecated]] void clear_weak() ; [[nodiscard]] [[deprecated]] bool weak() const; [[deprecated]] void set_weak(bool value); @@ -8221,8 +8127,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL]; - [[nodiscard]] bool has_jstype() - const; + [[nodiscard]] bool has_jstype() const; void clear_jstype() ; [[nodiscard]] ::google::protobuf::FieldOptions_JSType jstype() const; void set_jstype(::google::protobuf::FieldOptions_JSType value); @@ -8233,8 +8138,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional bool unverified_lazy = 15 [default = false]; - [[nodiscard]] bool has_unverified_lazy() - const; + [[nodiscard]] bool has_unverified_lazy() const; void clear_unverified_lazy() ; [[nodiscard]] bool unverified_lazy() const; void set_unverified_lazy(bool value); @@ -8245,8 +8149,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional bool debug_redact = 16 [default = false]; - [[nodiscard]] bool has_debug_redact() - const; + [[nodiscard]] bool has_debug_redact() const; void clear_debug_redact() ; [[nodiscard]] bool debug_redact() const; void set_debug_redact(bool value); @@ -8257,8 +8160,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // optional .google.protobuf.FieldOptions.OptionRetention retention = 17; - [[nodiscard]] bool has_retention() - const; + [[nodiscard]] bool has_retention() const; void clear_retention() ; [[nodiscard]] ::google::protobuf::FieldOptions_OptionRetention retention() const; void set_retention(::google::protobuf::FieldOptions_OptionRetention value); @@ -8269,8 +8171,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldOptions final public: // repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19; - [[nodiscard]] int targets_size() - const; + [[nodiscard]] int targets_size() const; private: int _internal_targets_size() const; @@ -8693,8 +8594,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSetDefaults kMaximumEditionFieldNumber = 5, }; // repeated .google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; - [[nodiscard]] int defaults_size() - const; + [[nodiscard]] int defaults_size() const; private: int _internal_defaults_size() const; @@ -8714,8 +8614,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSetDefaults public: // optional .google.protobuf.Edition minimum_edition = 4; - [[nodiscard]] bool has_minimum_edition() - const; + [[nodiscard]] bool has_minimum_edition() const; void clear_minimum_edition() ; [[nodiscard]] ::google::protobuf::Edition minimum_edition() const; void set_minimum_edition(::google::protobuf::Edition value); @@ -8726,8 +8625,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FeatureSetDefaults public: // optional .google.protobuf.Edition maximum_edition = 5; - [[nodiscard]] bool has_maximum_edition() - const; + [[nodiscard]] bool has_maximum_edition() const; void clear_maximum_edition() ; [[nodiscard]] ::google::protobuf::Edition maximum_edition() const; void set_maximum_edition(::google::protobuf::Edition value); @@ -8960,8 +8858,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ExtensionRangeOptio kVerificationFieldNumber = 3, }; // repeated .google.protobuf.ExtensionRangeOptions.Declaration declaration = 2 [retention = RETENTION_SOURCE]; - [[nodiscard]] int declaration_size() - const; + [[nodiscard]] int declaration_size() const; private: int _internal_declaration_size() const; @@ -8981,8 +8878,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ExtensionRangeOptio public: // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - [[nodiscard]] int uninterpreted_option_size() - const; + [[nodiscard]] int uninterpreted_option_size() const; private: int _internal_uninterpreted_option_size() const; @@ -9002,8 +8898,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ExtensionRangeOptio public: // optional .google.protobuf.FeatureSet features = 50; - [[nodiscard]] bool has_features() - const; + [[nodiscard]] bool has_features() const; void clear_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_features(); @@ -9018,8 +8913,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ExtensionRangeOptio public: // optional .google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED, retention = RETENTION_SOURCE]; - [[nodiscard]] bool has_verification() - const; + [[nodiscard]] bool has_verification() const; void clear_verification() ; [[nodiscard]] ::google::protobuf::ExtensionRangeOptions_VerificationState verification() const; void set_verification(::google::protobuf::ExtensionRangeOptions_VerificationState value); @@ -9424,8 +9318,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumValueOptions fi kDebugRedactFieldNumber = 3, }; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - [[nodiscard]] int uninterpreted_option_size() - const; + [[nodiscard]] int uninterpreted_option_size() const; private: int _internal_uninterpreted_option_size() const; @@ -9445,8 +9338,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumValueOptions fi public: // optional .google.protobuf.FeatureSet features = 2; - [[nodiscard]] bool has_features() - const; + [[nodiscard]] bool has_features() const; void clear_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_features(); @@ -9461,8 +9353,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumValueOptions fi public: // optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 4; - [[nodiscard]] bool has_feature_support() - const; + [[nodiscard]] bool has_feature_support() const; void clear_feature_support() ; [[nodiscard]] const ::google::protobuf::FieldOptions_FeatureSupport& feature_support() const; [[nodiscard]] ::google::protobuf::FieldOptions_FeatureSupport* PROTOBUF_NULLABLE release_feature_support(); @@ -9477,8 +9368,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumValueOptions fi public: // optional bool deprecated = 1 [default = false]; - [[nodiscard]] bool has_deprecated() - const; + [[nodiscard]] bool has_deprecated() const; void clear_deprecated() ; [[nodiscard]] bool deprecated() const; void set_deprecated(bool value); @@ -9489,8 +9379,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumValueOptions fi public: // optional bool debug_redact = 3 [default = false]; - [[nodiscard]] bool has_debug_redact() - const; + [[nodiscard]] bool has_debug_redact() const; void clear_debug_redact() ; [[nodiscard]] bool debug_redact() const; void set_debug_redact(bool value); @@ -9896,8 +9785,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumOptions final : kUninterpretedOptionFieldNumber = 999, }; // optional .google.protobuf.FeatureSet features = 7; - [[nodiscard]] bool has_features() - const; + [[nodiscard]] bool has_features() const; void clear_features() ; [[nodiscard]] const ::google::protobuf::FeatureSet& features() const; [[nodiscard]] ::google::protobuf::FeatureSet* PROTOBUF_NULLABLE release_features(); @@ -9912,8 +9800,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumOptions final : public: // optional bool allow_alias = 2; - [[nodiscard]] bool has_allow_alias() - const; + [[nodiscard]] bool has_allow_alias() const; void clear_allow_alias() ; [[nodiscard]] bool allow_alias() const; void set_allow_alias(bool value); @@ -9924,8 +9811,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumOptions final : public: // optional bool deprecated = 3 [default = false]; - [[nodiscard]] bool has_deprecated() - const; + [[nodiscard]] bool has_deprecated() const; void clear_deprecated() ; [[nodiscard]] bool deprecated() const; void set_deprecated(bool value); @@ -9936,8 +9822,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumOptions final : public: // optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; - [[nodiscard]] [[deprecated]] bool has_deprecated_legacy_json_field_conflicts() - const; + [[nodiscard]] [[deprecated]] bool has_deprecated_legacy_json_field_conflicts() const; [[deprecated]] void clear_deprecated_legacy_json_field_conflicts() ; [[nodiscard]] [[deprecated]] bool deprecated_legacy_json_field_conflicts() const; [[deprecated]] void set_deprecated_legacy_json_field_conflicts(bool value); @@ -9948,8 +9833,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumOptions final : public: // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; - [[nodiscard]] int uninterpreted_option_size() - const; + [[nodiscard]] int uninterpreted_option_size() const; private: int _internal_uninterpreted_option_size() const; @@ -10361,8 +10245,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED OneofDescriptorProt kOptionsFieldNumber = 2, }; // optional string name = 1; - [[nodiscard]] bool has_name() - const; + [[nodiscard]] bool has_name() const; void clear_name() ; [[nodiscard]] const ::std::string& name() const; template @@ -10378,8 +10261,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED OneofDescriptorProt public: // optional .google.protobuf.OneofOptions options = 2; - [[nodiscard]] bool has_options() - const; + [[nodiscard]] bool has_options() const; void clear_options() ; [[nodiscard]] const ::google::protobuf::OneofOptions& options() const; [[nodiscard]] ::google::protobuf::OneofOptions* PROTOBUF_NULLABLE release_options(); @@ -10596,8 +10478,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MethodDescriptorPro kServerStreamingFieldNumber = 6, }; // optional string name = 1; - [[nodiscard]] bool has_name() - const; + [[nodiscard]] bool has_name() const; void clear_name() ; [[nodiscard]] const ::std::string& name() const; template @@ -10613,8 +10494,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MethodDescriptorPro public: // optional string input_type = 2; - [[nodiscard]] bool has_input_type() - const; + [[nodiscard]] bool has_input_type() const; void clear_input_type() ; [[nodiscard]] const ::std::string& input_type() const; template @@ -10630,8 +10510,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MethodDescriptorPro public: // optional string output_type = 3; - [[nodiscard]] bool has_output_type() - const; + [[nodiscard]] bool has_output_type() const; void clear_output_type() ; [[nodiscard]] const ::std::string& output_type() const; template @@ -10647,8 +10526,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MethodDescriptorPro public: // optional .google.protobuf.MethodOptions options = 4; - [[nodiscard]] bool has_options() - const; + [[nodiscard]] bool has_options() const; void clear_options() ; [[nodiscard]] const ::google::protobuf::MethodOptions& options() const; [[nodiscard]] ::google::protobuf::MethodOptions* PROTOBUF_NULLABLE release_options(); @@ -10663,8 +10541,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MethodDescriptorPro public: // optional bool client_streaming = 5 [default = false]; - [[nodiscard]] bool has_client_streaming() - const; + [[nodiscard]] bool has_client_streaming() const; void clear_client_streaming() ; [[nodiscard]] bool client_streaming() const; void set_client_streaming(bool value); @@ -10675,8 +10552,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED MethodDescriptorPro public: // optional bool server_streaming = 6 [default = false]; - [[nodiscard]] bool has_server_streaming() - const; + [[nodiscard]] bool has_server_streaming() const; void clear_server_streaming() ; [[nodiscard]] bool server_streaming() const; void set_server_streaming(bool value); @@ -10955,8 +10831,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt kTypeFieldNumber = 5, }; // optional string name = 1; - [[nodiscard]] bool has_name() - const; + [[nodiscard]] bool has_name() const; void clear_name() ; [[nodiscard]] const ::std::string& name() const; template @@ -10972,8 +10847,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt public: // optional string extendee = 2; - [[nodiscard]] bool has_extendee() - const; + [[nodiscard]] bool has_extendee() const; void clear_extendee() ; [[nodiscard]] const ::std::string& extendee() const; template @@ -10989,8 +10863,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt public: // optional string type_name = 6; - [[nodiscard]] bool has_type_name() - const; + [[nodiscard]] bool has_type_name() const; void clear_type_name() ; [[nodiscard]] const ::std::string& type_name() const; template @@ -11006,8 +10879,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt public: // optional string default_value = 7; - [[nodiscard]] bool has_default_value() - const; + [[nodiscard]] bool has_default_value() const; void clear_default_value() ; [[nodiscard]] const ::std::string& default_value() const; template @@ -11023,8 +10895,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt public: // optional string json_name = 10; - [[nodiscard]] bool has_json_name() - const; + [[nodiscard]] bool has_json_name() const; void clear_json_name() ; [[nodiscard]] const ::std::string& json_name() const; template @@ -11040,8 +10911,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt public: // optional .google.protobuf.FieldOptions options = 8; - [[nodiscard]] bool has_options() - const; + [[nodiscard]] bool has_options() const; void clear_options() ; [[nodiscard]] const ::google::protobuf::FieldOptions& options() const; [[nodiscard]] ::google::protobuf::FieldOptions* PROTOBUF_NULLABLE release_options(); @@ -11056,8 +10926,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt public: // optional int32 number = 3; - [[nodiscard]] bool has_number() - const; + [[nodiscard]] bool has_number() const; void clear_number() ; [[nodiscard]] ::int32_t number() const; void set_number(::int32_t value); @@ -11068,8 +10937,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt public: // optional int32 oneof_index = 9; - [[nodiscard]] bool has_oneof_index() - const; + [[nodiscard]] bool has_oneof_index() const; void clear_oneof_index() ; [[nodiscard]] ::int32_t oneof_index() const; void set_oneof_index(::int32_t value); @@ -11080,8 +10948,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt public: // optional bool proto3_optional = 17; - [[nodiscard]] bool has_proto3_optional() - const; + [[nodiscard]] bool has_proto3_optional() const; void clear_proto3_optional() ; [[nodiscard]] bool proto3_optional() const; void set_proto3_optional(bool value); @@ -11092,8 +10959,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt public: // optional .google.protobuf.FieldDescriptorProto.Label label = 4; - [[nodiscard]] bool has_label() - const; + [[nodiscard]] bool has_label() const; void clear_label() ; [[nodiscard]] ::google::protobuf::FieldDescriptorProto_Label label() const; void set_label(::google::protobuf::FieldDescriptorProto_Label value); @@ -11104,8 +10970,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FieldDescriptorProt public: // optional .google.protobuf.FieldDescriptorProto.Type type = 5; - [[nodiscard]] bool has_type() - const; + [[nodiscard]] bool has_type() const; void clear_type() ; [[nodiscard]] ::google::protobuf::FieldDescriptorProto_Type type() const; void set_type(::google::protobuf::FieldDescriptorProto_Type value); @@ -11324,8 +11189,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumValueDescriptor kNumberFieldNumber = 2, }; // optional string name = 1; - [[nodiscard]] bool has_name() - const; + [[nodiscard]] bool has_name() const; void clear_name() ; [[nodiscard]] const ::std::string& name() const; template @@ -11341,8 +11205,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumValueDescriptor public: // optional .google.protobuf.EnumValueOptions options = 3; - [[nodiscard]] bool has_options() - const; + [[nodiscard]] bool has_options() const; void clear_options() ; [[nodiscard]] const ::google::protobuf::EnumValueOptions& options() const; [[nodiscard]] ::google::protobuf::EnumValueOptions* PROTOBUF_NULLABLE release_options(); @@ -11357,8 +11220,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumValueDescriptor public: // optional int32 number = 2; - [[nodiscard]] bool has_number() - const; + [[nodiscard]] bool has_number() const; void clear_number() ; [[nodiscard]] ::int32_t number() const; void set_number(::int32_t value); @@ -11569,8 +11431,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto_Ext kEndFieldNumber = 2, }; // optional .google.protobuf.ExtensionRangeOptions options = 3; - [[nodiscard]] bool has_options() - const; + [[nodiscard]] bool has_options() const; void clear_options() ; [[nodiscard]] const ::google::protobuf::ExtensionRangeOptions& options() const; [[nodiscard]] ::google::protobuf::ExtensionRangeOptions* PROTOBUF_NULLABLE release_options(); @@ -11585,8 +11446,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto_Ext public: // optional int32 start = 1; - [[nodiscard]] bool has_start() - const; + [[nodiscard]] bool has_start() const; void clear_start() ; [[nodiscard]] ::int32_t start() const; void set_start(::int32_t value); @@ -11597,8 +11457,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto_Ext public: // optional int32 end = 2; - [[nodiscard]] bool has_end() - const; + [[nodiscard]] bool has_end() const; void clear_end() ; [[nodiscard]] ::int32_t end() const; void set_end(::int32_t value); @@ -11809,8 +11668,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ServiceDescriptorPr kOptionsFieldNumber = 3, }; // repeated .google.protobuf.MethodDescriptorProto method = 2; - [[nodiscard]] int method_size() - const; + [[nodiscard]] int method_size() const; private: int _internal_method_size() const; @@ -11830,8 +11688,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ServiceDescriptorPr public: // optional string name = 1; - [[nodiscard]] bool has_name() - const; + [[nodiscard]] bool has_name() const; void clear_name() ; [[nodiscard]] const ::std::string& name() const; template @@ -11847,8 +11704,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED ServiceDescriptorPr public: // optional .google.protobuf.ServiceOptions options = 3; - [[nodiscard]] bool has_options() - const; + [[nodiscard]] bool has_options() const; void clear_options() ; [[nodiscard]] const ::google::protobuf::ServiceOptions& options() const; [[nodiscard]] ::google::protobuf::ServiceOptions* PROTOBUF_NULLABLE release_options(); @@ -12067,8 +11923,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumDescriptorProto kVisibilityFieldNumber = 6, }; // repeated .google.protobuf.EnumValueDescriptorProto value = 2; - [[nodiscard]] int value_size() - const; + [[nodiscard]] int value_size() const; private: int _internal_value_size() const; @@ -12088,8 +11943,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumDescriptorProto public: // repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; - [[nodiscard]] int reserved_range_size() - const; + [[nodiscard]] int reserved_range_size() const; private: int _internal_reserved_range_size() const; @@ -12109,8 +11963,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumDescriptorProto public: // repeated string reserved_name = 5; - [[nodiscard]] int reserved_name_size() - const; + [[nodiscard]] int reserved_name_size() const; private: int _internal_reserved_name_size() const; @@ -12136,8 +11989,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumDescriptorProto public: // optional string name = 1; - [[nodiscard]] bool has_name() - const; + [[nodiscard]] bool has_name() const; void clear_name() ; [[nodiscard]] const ::std::string& name() const; template @@ -12153,8 +12005,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumDescriptorProto public: // optional .google.protobuf.EnumOptions options = 3; - [[nodiscard]] bool has_options() - const; + [[nodiscard]] bool has_options() const; void clear_options() ; [[nodiscard]] const ::google::protobuf::EnumOptions& options() const; [[nodiscard]] ::google::protobuf::EnumOptions* PROTOBUF_NULLABLE release_options(); @@ -12169,8 +12020,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED EnumDescriptorProto public: // optional .google.protobuf.SymbolVisibility visibility = 6; - [[nodiscard]] bool has_visibility() - const; + [[nodiscard]] bool has_visibility() const; void clear_visibility() ; [[nodiscard]] ::google::protobuf::SymbolVisibility visibility() const; void set_visibility(::google::protobuf::SymbolVisibility value); @@ -12394,8 +12244,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin kVisibilityFieldNumber = 11, }; // repeated .google.protobuf.FieldDescriptorProto field = 2; - [[nodiscard]] int field_size() - const; + [[nodiscard]] int field_size() const; private: int _internal_field_size() const; @@ -12415,8 +12264,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin public: // repeated .google.protobuf.DescriptorProto nested_type = 3; - [[nodiscard]] int nested_type_size() - const; + [[nodiscard]] int nested_type_size() const; private: int _internal_nested_type_size() const; @@ -12436,8 +12284,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin public: // repeated .google.protobuf.EnumDescriptorProto enum_type = 4; - [[nodiscard]] int enum_type_size() - const; + [[nodiscard]] int enum_type_size() const; private: int _internal_enum_type_size() const; @@ -12457,8 +12304,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin public: // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - [[nodiscard]] int extension_range_size() - const; + [[nodiscard]] int extension_range_size() const; private: int _internal_extension_range_size() const; @@ -12478,8 +12324,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin public: // repeated .google.protobuf.FieldDescriptorProto extension = 6; - [[nodiscard]] int extension_size() - const; + [[nodiscard]] int extension_size() const; private: int _internal_extension_size() const; @@ -12499,8 +12344,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin public: // repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8; - [[nodiscard]] int oneof_decl_size() - const; + [[nodiscard]] int oneof_decl_size() const; private: int _internal_oneof_decl_size() const; @@ -12520,8 +12364,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin public: // repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - [[nodiscard]] int reserved_range_size() - const; + [[nodiscard]] int reserved_range_size() const; private: int _internal_reserved_range_size() const; @@ -12541,8 +12384,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin public: // repeated string reserved_name = 10; - [[nodiscard]] int reserved_name_size() - const; + [[nodiscard]] int reserved_name_size() const; private: int _internal_reserved_name_size() const; @@ -12568,8 +12410,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin public: // optional string name = 1; - [[nodiscard]] bool has_name() - const; + [[nodiscard]] bool has_name() const; void clear_name() ; [[nodiscard]] const ::std::string& name() const; template @@ -12585,8 +12426,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin public: // optional .google.protobuf.MessageOptions options = 7; - [[nodiscard]] bool has_options() - const; + [[nodiscard]] bool has_options() const; void clear_options() ; [[nodiscard]] const ::google::protobuf::MessageOptions& options() const; [[nodiscard]] ::google::protobuf::MessageOptions* PROTOBUF_NULLABLE release_options(); @@ -12601,8 +12441,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED DescriptorProto fin public: // optional .google.protobuf.SymbolVisibility visibility = 11; - [[nodiscard]] bool has_visibility() - const; + [[nodiscard]] bool has_visibility() const; void clear_visibility() ; [[nodiscard]] ::google::protobuf::SymbolVisibility visibility() const; void set_visibility(::google::protobuf::SymbolVisibility value); @@ -12832,8 +12671,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto kEditionFieldNumber = 14, }; // repeated string dependency = 3; - [[nodiscard]] int dependency_size() - const; + [[nodiscard]] int dependency_size() const; private: int _internal_dependency_size() const; @@ -12859,8 +12697,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // repeated .google.protobuf.DescriptorProto message_type = 4; - [[nodiscard]] int message_type_size() - const; + [[nodiscard]] int message_type_size() const; private: int _internal_message_type_size() const; @@ -12880,8 +12717,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // repeated .google.protobuf.EnumDescriptorProto enum_type = 5; - [[nodiscard]] int enum_type_size() - const; + [[nodiscard]] int enum_type_size() const; private: int _internal_enum_type_size() const; @@ -12901,8 +12737,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // repeated .google.protobuf.ServiceDescriptorProto service = 6; - [[nodiscard]] int service_size() - const; + [[nodiscard]] int service_size() const; private: int _internal_service_size() const; @@ -12922,8 +12757,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // repeated .google.protobuf.FieldDescriptorProto extension = 7; - [[nodiscard]] int extension_size() - const; + [[nodiscard]] int extension_size() const; private: int _internal_extension_size() const; @@ -12943,8 +12777,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // repeated int32 public_dependency = 10; - [[nodiscard]] int public_dependency_size() - const; + [[nodiscard]] int public_dependency_size() const; private: int _internal_public_dependency_size() const; @@ -12963,8 +12796,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // repeated int32 weak_dependency = 11; - [[nodiscard]] int weak_dependency_size() - const; + [[nodiscard]] int weak_dependency_size() const; private: int _internal_weak_dependency_size() const; @@ -12983,8 +12815,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // repeated string option_dependency = 15; - [[nodiscard]] int option_dependency_size() - const; + [[nodiscard]] int option_dependency_size() const; private: int _internal_option_dependency_size() const; @@ -13010,8 +12841,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // optional string name = 1; - [[nodiscard]] bool has_name() - const; + [[nodiscard]] bool has_name() const; void clear_name() ; [[nodiscard]] const ::std::string& name() const; template @@ -13027,8 +12857,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // optional string package = 2; - [[nodiscard]] bool has_package() - const; + [[nodiscard]] bool has_package() const; void clear_package() ; [[nodiscard]] const ::std::string& package() const; template @@ -13044,8 +12873,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // optional string syntax = 12; - [[nodiscard]] bool has_syntax() - const; + [[nodiscard]] bool has_syntax() const; void clear_syntax() ; [[nodiscard]] const ::std::string& syntax() const; template @@ -13061,8 +12889,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // optional .google.protobuf.FileOptions options = 8; - [[nodiscard]] bool has_options() - const; + [[nodiscard]] bool has_options() const; void clear_options() ; [[nodiscard]] const ::google::protobuf::FileOptions& options() const; [[nodiscard]] ::google::protobuf::FileOptions* PROTOBUF_NULLABLE release_options(); @@ -13077,8 +12904,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // optional .google.protobuf.SourceCodeInfo source_code_info = 9; - [[nodiscard]] bool has_source_code_info() - const; + [[nodiscard]] bool has_source_code_info() const; void clear_source_code_info() ; [[nodiscard]] const ::google::protobuf::SourceCodeInfo& source_code_info() const; [[nodiscard]] ::google::protobuf::SourceCodeInfo* PROTOBUF_NULLABLE release_source_code_info(); @@ -13093,8 +12919,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorProto public: // optional .google.protobuf.Edition edition = 14; - [[nodiscard]] bool has_edition() - const; + [[nodiscard]] bool has_edition() const; void clear_edition() ; [[nodiscard]] ::google::protobuf::Edition edition() const; void set_edition(::google::protobuf::Edition value); @@ -13314,8 +13139,7 @@ class PROTOBUF_EXPORT PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED FileDescriptorSet f kFileFieldNumber = 1, }; // repeated .google.protobuf.FileDescriptorProto file = 1; - [[nodiscard]] int file_size() - const; + [[nodiscard]] int file_size() const; private: int _internal_file_size() const; diff --git a/src/google/protobuf/generated_message_reflection.cc b/src/google/protobuf/generated_message_reflection.cc index 29e15259d42f7..eb6ce174ae675 100644 --- a/src/google/protobuf/generated_message_reflection.cc +++ b/src/google/protobuf/generated_message_reflection.cc @@ -1420,6 +1420,12 @@ void Reflection::MaybePoisonAfterClear(Message& root) const { } } +bool Reflection::SplitFieldHasExtraIndirection( + const FieldDescriptor* field) const { + return field->is_repeated() || + (internal::EnableLazySplit() && GetLazyStyle(field) != 0); +} + int Reflection::FieldSize(const Message& message, const FieldDescriptor* field) const { USAGE_CHECK_MESSAGE(FieldSize, &message); @@ -3085,7 +3091,7 @@ void* Reflection::MutableRawSplitImpl(Message* message, const uint32_t field_offset = schema_.GetFieldOffset(field); PrepareSplitMessageForWrite(message); void** split = MutableSplitField(message); - if (internal::SplitFieldHasExtraIndirection(field)) { + if (SplitFieldHasExtraIndirection(field)) { return AllocIfDefault(field, *GetPointerAtOffset(*split, field_offset), message->GetArena()); @@ -4149,10 +4155,6 @@ bool IsDescendant(const Message& root, const Message& message) { return false; } -bool SplitFieldHasExtraIndirection(const FieldDescriptor* field) { - return field->is_repeated(); -} - #if defined(PROTOBUF_DESCRIPTOR_WEAK_MESSAGES_ALLOWED) const Message* GetPrototypeForWeakDescriptor(const DescriptorTable* table, int index, bool force_build) { diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h index da2926397b8c5..ae31484ef18b1 100644 --- a/src/google/protobuf/generated_message_reflection.h +++ b/src/google/protobuf/generated_message_reflection.h @@ -358,11 +358,6 @@ const std::string& NameOfDenseEnum(int v) { return NameOfDenseEnumSlow(v, &deci); } -// Returns whether this type of field is stored in the split struct as a raw -// pointer. -PROTOBUF_EXPORT bool SplitFieldHasExtraIndirection( - const FieldDescriptor* field); - } // namespace internal } // namespace protobuf } // namespace google diff --git a/src/google/protobuf/generated_message_tctable_impl.h b/src/google/protobuf/generated_message_tctable_impl.h index c4912026ea2c1..ba821dfabd221 100644 --- a/src/google/protobuf/generated_message_tctable_impl.h +++ b/src/google/protobuf/generated_message_tctable_impl.h @@ -33,6 +33,7 @@ #include "google/protobuf/serial_arena.h" #include "google/protobuf/wire_format_lite.h" + // Must come last: #include "google/protobuf/port_def.inc" @@ -786,8 +787,8 @@ class PROTOBUF_EXPORT TcParser final { } template - static inline T& MaybeCreateRepeatedRefAt(void* x, size_t offset, - MessageLite* msg) { + static inline T& MaybeCreateRawPtrRefAt(void* x, size_t offset, + MessageLite* msg) { if (!is_split) return RefAt(x, offset); void*& ptr = RefAt(x, offset); if (ptr == DefaultRawPtr()) { @@ -799,14 +800,14 @@ class PROTOBUF_EXPORT TcParser final { template static inline RepeatedField& MaybeCreateRepeatedFieldRefAt( void* x, size_t offset, MessageLite* msg) { - return MaybeCreateRepeatedRefAt, is_split>(x, offset, msg); + return MaybeCreateRawPtrRefAt, is_split>(x, offset, msg); } template static inline RepeatedPtrField& MaybeCreateRepeatedPtrFieldRefAt( void* x, size_t offset, MessageLite* msg) { - return MaybeCreateRepeatedRefAt, is_split>(x, offset, - msg); + return MaybeCreateRawPtrRefAt, is_split>(x, offset, + msg); } template @@ -1143,6 +1144,7 @@ class PROTOBUF_EXPORT TcParser final { template PROTOBUF_CC static const char* MpRepeatedMessageOrGroup( PROTOBUF_TC_PARAM_DECL); + template PROTOBUF_CC static const char* MpLazyMessage(PROTOBUF_TC_PARAM_DECL); PROTOBUF_NOINLINE PROTOBUF_CC static const char* MpFallback(PROTOBUF_TC_PARAM_DECL); diff --git a/src/google/protobuf/generated_message_tctable_lite.cc b/src/google/protobuf/generated_message_tctable_lite.cc index 7f45f7bc2c5e7..43e9acbb3ed89 100644 --- a/src/google/protobuf/generated_message_tctable_lite.cc +++ b/src/google/protobuf/generated_message_tctable_lite.cc @@ -2813,8 +2813,8 @@ const char* TcParser::MpRepeatedMessageOrGroup(PROTOBUF_TC_PARAM_DECL) { void* const base = MaybeGetSplitBase(msg, is_split, table); RepeatedPtrFieldBase& field = - MaybeCreateRepeatedRefAt( - base, entry.offset, msg); + MaybeCreateRawPtrRefAt(base, entry.offset, + msg); ABSL_DCHECK_EQ(field.GetArena(), msg->GetArena()); const auto aux = *table->field_aux(&entry); // Captured structured bindings are a C++20 feature. diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h index 09db8a18b2b2f..93be01322aef3 100644 --- a/src/google/protobuf/message.h +++ b/src/google/protobuf/message.h @@ -1148,6 +1148,14 @@ class PROTOBUF_EXPORT Reflection final { return schema_.IsSplit(field); } + // Returns whether this type of field is stored in the split struct as a raw + // pointer. + bool SplitFieldHasExtraIndirection(const FieldDescriptor* field) const; + + template + [[nodiscard]] bool SplitFieldHasExtraIndirectionStatic( + const FieldDescriptor* field) const; + // Walks the message tree from "root" and poisons (under ASAN) the memory to // force subsequent accesses to fail. Always calls Clear beforehand to clear // strings, etc. @@ -1726,26 +1734,30 @@ void** Reflection::MutableSplitField(Message* message) const { return internal::GetPointerAtOffset(message, schema_.SplitOffset()); } -namespace internal { - // In some cases, (Get|Mutable)Raw may be called with a type that is different // from the final type; e.g. char. As a defensive coding to this unfortunate // practices, we should only assume extra indirection (or a lack thereof) for // the well known, complex types. template -PROTOBUF_FUTURE_ADD_EARLY_NODISCARD bool SplitFieldHasExtraIndirectionStatic( - const FieldDescriptor* field) { - if (std::is_base_of() || - std::is_base_of()) { +[[nodiscard]] bool Reflection::SplitFieldHasExtraIndirectionStatic( + const FieldDescriptor* field) const { + if constexpr (std::is_base_of() || + std::is_base_of()) { ABSL_DCHECK(SplitFieldHasExtraIndirection(field)); return true; - } else if (std::is_base_of()) { + } else if constexpr (std::is_base_of()) { ABSL_DCHECK(!SplitFieldHasExtraIndirection(field)); return false; + } else if constexpr (internal::EnableLazySplit() && + std::is_same_v) { + ABSL_DCHECK(SplitFieldHasExtraIndirection(field)); + return true; } return SplitFieldHasExtraIndirection(field); } +namespace internal { + inline void MaybePoisonAfterClear(Message* root) { if (root == nullptr) return; if constexpr (HasMemoryPoisoning()) { @@ -1889,7 +1901,7 @@ const Type& Reflection::GetRaw(const Message& message, << "Field = " << field->full_name(); const void* split = GetSplitField(&message); - if (internal::SplitFieldHasExtraIndirectionStatic(field)) { + if (SplitFieldHasExtraIndirectionStatic(field)) { return **internal::GetConstPointerAtOffset(split, field_offset); } return *internal::GetConstPointerAtOffset(split, field_offset); diff --git a/src/google/protobuf/port.h b/src/google/protobuf/port.h index 9cab85951f71e..799349a849a88 100644 --- a/src/google/protobuf/port.h +++ b/src/google/protobuf/port.h @@ -300,6 +300,9 @@ inline constexpr bool ForceSplitFieldsInProtoc() { #endif } +// Returns true if lazy sub-message fields are eligible for splitting. +inline constexpr bool EnableLazySplit() { return true; } + // Returns true if debug hardening for clearing oneof message on arenas is // enabled. inline constexpr bool DebugHardenClearOneofMessageOnArena() {