|
|
|
@ -358,7 +358,11 @@ bool HasRequiredFields(const Descriptor* descriptor); |
|
|
|
|
bool IsRealOneof(const FieldDescriptor* descriptor); |
|
|
|
|
|
|
|
|
|
inline bool HasHasbit(const FieldDescriptor* descriptor) { |
|
|
|
|
return internal::cpp::HasHasbit(descriptor); |
|
|
|
|
// TODO(b/241441075) Replace this with internal::cpp::HasHasbit once Elysium
|
|
|
|
|
// unblocks this change.
|
|
|
|
|
return (FieldDescriptorLegacy(descriptor).has_optional_keyword() || |
|
|
|
|
descriptor->is_required()) && |
|
|
|
|
!descriptor->options().weak(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Whether generate classes expose public PARSER instances.
|
|
|
|
|