Skip to content

Commit d4e7a42

Browse files
CEL Dev Teamcopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 932826890
1 parent 7641fac commit d4e7a42

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

eval/compiler/flat_expr_builder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ class FlatExprVisitor : public cel::AstVisitor {
10781078
// eligible for recursion, or nullopt if it is not.
10791079
std::optional<int> RecursionEligible() {
10801080
if (!PlanRecursiveProgram() || program_builder_.current() == nullptr) {
1081-
return absl::nullopt;
1081+
return std::nullopt;
10821082
}
10831083
return program_builder_.current()->RecursiveDependencyDepth();
10841084
}

eval/compiler/flat_expr_builder_extensions.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ std::optional<int> Subexpression::RecursiveDependencyDepth() const {
102102
auto* tree = absl::get_if<TreePlan>(&program_);
103103
int depth = 0;
104104
if (tree == nullptr) {
105-
return absl::nullopt;
105+
return std::nullopt;
106106
}
107107
for (const auto& element : *tree) {
108108
auto* subexpression = absl::get_if<Subexpression*>(&element);
109109
if (subexpression == nullptr) {
110-
return absl::nullopt;
110+
return std::nullopt;
111111
}
112112
if (!(*subexpression)->IsRecursive()) {
113-
return absl::nullopt;
113+
return std::nullopt;
114114
}
115115
depth = std::max(depth, (*subexpression)->recursive_program().depth);
116116
}

eval/compiler/qualified_reference_resolver.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ std::optional<std::string> BestOverloadMatch(const Resolver& resolver,
9999
return *name;
100100
}
101101
}
102-
return absl::nullopt;
102+
return std::nullopt;
103103
}
104104

105105
// Rewriter visitor for resolving references.
@@ -267,22 +267,22 @@ class ReferenceResolver : public cel::AstRewriterBase {
267267
if (rewritten_reference_.find(expr.id()) != rewritten_reference_.end()) {
268268
// The target expr matches a reference (resolved to an ident decl).
269269
// This should not be treated as a function qualifier.
270-
return absl::nullopt;
270+
return std::nullopt;
271271
}
272272
if (expr.has_ident_expr()) {
273273
return expr.ident_expr().name();
274274
} else if (expr.has_select_expr()) {
275275
if (expr.select_expr().test_only()) {
276-
return absl::nullopt;
276+
return std::nullopt;
277277
}
278278
maybe_parent_namespace = ToNamespace(expr.select_expr().operand());
279279
if (!maybe_parent_namespace.has_value()) {
280-
return absl::nullopt;
280+
return std::nullopt;
281281
}
282282
return absl::StrCat(*maybe_parent_namespace, ".",
283283
expr.select_expr().field());
284284
} else {
285-
return absl::nullopt;
285+
return std::nullopt;
286286
}
287287
}
288288

eval/compiler/regex_precompilation_optimization.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class RegexPrecompilationOptimization : public ProgramOptimizer {
178178

179179
if (subexpression == nullptr || subexpression->IsFlattened()) {
180180
// Already modified, can't recover the input pattern.
181-
return absl::nullopt;
181+
return std::nullopt;
182182
}
183183
std::optional<Value> constant;
184184
if (subexpression->IsRecursive()) {
@@ -206,7 +206,7 @@ class RegexPrecompilationOptimization : public ProgramOptimizer {
206206
return Cast<StringValue>(*constant).ToString();
207207
}
208208

209-
return absl::nullopt;
209+
return std::nullopt;
210210
}
211211

212212
absl::Status RewritePlan(

eval/compiler/resolver.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ std::optional<cel::Value> Resolver::FindConstant(absl::string_view name,
128128
return TypeValue(**type_value);
129129
}
130130
}
131-
return absl::nullopt;
131+
return std::nullopt;
132132
}
133133

134134
std::vector<cel::FunctionOverloadReference> Resolver::FindOverloads(
@@ -216,7 +216,7 @@ Resolver::FindType(absl::string_view name, int64_t expr_id) const {
216216
return std::make_pair(std::move(qualified_name), std::move(*maybe_type));
217217
}
218218
}
219-
return absl::nullopt;
219+
return std::nullopt;
220220
}
221221

222222
} // namespace google::api::expr::runtime

0 commit comments

Comments
 (0)