| 238 | } |
| 239 | |
| 240 | absl::StatusOr<bool> ParsedMessageValue::HasFieldByNumber( |
| 241 | int64_t number) const { |
| 242 | const auto* descriptor = GetDescriptor(); |
| 243 | if (number < std::numeric_limits<int32_t>::min() || |
| 244 | number > std::numeric_limits<int32_t>::max()) { |
| 245 | return NoSuchFieldError(absl::StrCat(number)).NativeValue(); |
| 246 | } |
| 247 | const auto* field = descriptor->FindFieldByNumber(static_cast<int>(number)); |
| 248 | if (field == nullptr) { |
| 249 | return NoSuchFieldError(absl::StrCat(number)).NativeValue(); |
| 250 | } |
| 251 | return HasField(field); |
| 252 | } |
| 253 | |
| 254 | absl::Status ParsedMessageValue::ForEachField( |
| 255 | ForEachFieldCallback callback, |
nothing calls this directly
no test coverage detected