| 286 | } |
| 287 | |
| 288 | absl::StatusOr<int> ProtoQualifyState::CheckListIndex( |
| 289 | const cel::AttributeQualifier& qualifier) const { |
| 290 | if (qualifier.kind() != cel::Kind::kInt64) { |
| 291 | return runtime_internal::CreateNoMatchingOverloadError( |
| 292 | cel::builtin::kIndex); |
| 293 | } |
| 294 | |
| 295 | int index = *qualifier.GetInt64Key(); |
| 296 | int size = reflection_->FieldSize(*message_, repeated_field_desc_); |
| 297 | if (index < 0 || index >= size) { |
| 298 | return absl::InvalidArgumentError( |
| 299 | absl::StrCat("index out of bounds: index=", index, " size=", size)); |
| 300 | } |
| 301 | return index; |
| 302 | } |
| 303 | |
| 304 | absl::Status ProtoQualifyState::ApplyAttributeQualifierList( |
| 305 | const cel::AttributeQualifier& qualifier, MemoryManagerRef memory_manager) { |
nothing calls this directly
no test coverage detected