Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eval/compiler/flat_expr_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ class FlatExprVisitor : public cel::AstVisitor {
// eligible for recursion, or nullopt if it is not.
std::optional<int> RecursionEligible() {
if (!PlanRecursiveProgram() || program_builder_.current() == nullptr) {
return absl::nullopt;
return std::nullopt;
}
return program_builder_.current()->RecursiveDependencyDepth();
}
Expand Down
6 changes: 3 additions & 3 deletions eval/compiler/flat_expr_builder_extensions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ std::optional<int> Subexpression::RecursiveDependencyDepth() const {
auto* tree = absl::get_if<TreePlan>(&program_);
int depth = 0;
if (tree == nullptr) {
return absl::nullopt;
return std::nullopt;
}
for (const auto& element : *tree) {
auto* subexpression = absl::get_if<Subexpression*>(&element);
if (subexpression == nullptr) {
return absl::nullopt;
return std::nullopt;
}
if (!(*subexpression)->IsRecursive()) {
return absl::nullopt;
return std::nullopt;
}
depth = std::max(depth, (*subexpression)->recursive_program().depth);
}
Expand Down
10 changes: 5 additions & 5 deletions eval/compiler/qualified_reference_resolver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ std::optional<std::string> BestOverloadMatch(const Resolver& resolver,
return *name;
}
}
return absl::nullopt;
return std::nullopt;
}

// Rewriter visitor for resolving references.
Expand Down Expand Up @@ -267,22 +267,22 @@ class ReferenceResolver : public cel::AstRewriterBase {
if (rewritten_reference_.find(expr.id()) != rewritten_reference_.end()) {
// The target expr matches a reference (resolved to an ident decl).
// This should not be treated as a function qualifier.
return absl::nullopt;
return std::nullopt;
}
if (expr.has_ident_expr()) {
return expr.ident_expr().name();
} else if (expr.has_select_expr()) {
if (expr.select_expr().test_only()) {
return absl::nullopt;
return std::nullopt;
}
maybe_parent_namespace = ToNamespace(expr.select_expr().operand());
if (!maybe_parent_namespace.has_value()) {
return absl::nullopt;
return std::nullopt;
}
return absl::StrCat(*maybe_parent_namespace, ".",
expr.select_expr().field());
} else {
return absl::nullopt;
return std::nullopt;
}
}

Expand Down
4 changes: 2 additions & 2 deletions eval/compiler/regex_precompilation_optimization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class RegexPrecompilationOptimization : public ProgramOptimizer {

if (subexpression == nullptr || subexpression->IsFlattened()) {
// Already modified, can't recover the input pattern.
return absl::nullopt;
return std::nullopt;
}
std::optional<Value> constant;
if (subexpression->IsRecursive()) {
Expand Down Expand Up @@ -206,7 +206,7 @@ class RegexPrecompilationOptimization : public ProgramOptimizer {
return Cast<StringValue>(*constant).ToString();
}

return absl::nullopt;
return std::nullopt;
}

absl::Status RewritePlan(
Expand Down
4 changes: 2 additions & 2 deletions eval/compiler/resolver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ std::optional<cel::Value> Resolver::FindConstant(absl::string_view name,
return TypeValue(**type_value);
}
}
return absl::nullopt;
return std::nullopt;
}

std::vector<cel::FunctionOverloadReference> Resolver::FindOverloads(
Expand Down Expand Up @@ -216,7 +216,7 @@ Resolver::FindType(absl::string_view name, int64_t expr_id) const {
return std::make_pair(std::move(qualified_name), std::move(*maybe_type));
}
}
return absl::nullopt;
return std::nullopt;
}

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