MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / MakeOptionalIndicesSet

Function MakeOptionalIndicesSet

eval/compiler/flat_expr_builder.cc:466–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464};
465
466absl::flat_hash_set<int32_t> MakeOptionalIndicesSet(
467 const cel::ListExpr& create_list_expr) {
468 absl::flat_hash_set<int32_t> optional_indices;
469 for (size_t i = 0; i < create_list_expr.elements().size(); ++i) {
470 if (create_list_expr.elements()[i].optional()) {
471 optional_indices.insert(static_cast<int32_t>(i));
472 }
473 }
474 return optional_indices;
475}
476
477absl::flat_hash_set<int32_t> MakeOptionalIndicesSet(
478 const cel::StructExpr& create_struct_expr) {

Callers 3

PostVisitListMethod · 0.70
PostVisitStructMethod · 0.70
PostVisitMapMethod · 0.70

Calls 2

sizeMethod · 0.45
optionalMethod · 0.45

Tested by

no test coverage detected