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 extensions/bindings_ext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ std::vector<Macro> bindings_macros() {
[](MacroExprFactory& factory, Expr& target,
absl::Span<Expr> args) -> absl::optional<Expr> {
if (!IsTargetNamespace(target)) {
return absl::nullopt;
return std::nullopt;
}
if (!args[0].has_ident_expr()) {
return factory.ReportErrorAt(
Expand Down
2 changes: 1 addition & 1 deletion extensions/lists_functions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ Macro ListSortByMacro() {
MakeMapComprehension(factory, factory.Copy(sortby_input_ident),
std::move(key_ident), std::move(key_expr));
if (!map_compr.has_value()) {
return absl::nullopt;
return std::nullopt;
}

// Build the call expression:
Expand Down
6 changes: 3 additions & 3 deletions extensions/math_ext_macros.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ absl::optional<Expr> CheckInvalidArgs(MacroExprFactory &factory,
}
}

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

bool IsListLiteralWithValidArgs(const Expr &arg) {
Expand All @@ -99,7 +99,7 @@ std::vector<Macro> math_macros() {
[](MacroExprFactory &factory, Expr &target,
absl::Span<Expr> arguments) -> absl::optional<Expr> {
if (!IsTargetNamespace(target)) {
return absl::nullopt;
return std::nullopt;
}

switch (arguments.size()) {
Expand Down Expand Up @@ -143,7 +143,7 @@ std::vector<Macro> math_macros() {
[](MacroExprFactory &factory, Expr &target,
absl::Span<Expr> arguments) -> absl::optional<Expr> {
if (!IsTargetNamespace(target)) {
return absl::nullopt;
return std::nullopt;
}

switch (arguments.size()) {
Expand Down
4 changes: 2 additions & 2 deletions extensions/math_ext_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ TestCase MinCase(CelValue v1, CelValue v2, CelValue result) {
}

TestCase MinCase(CelValue list, CelValue result) {
return TestCase{kMathMin, list, absl::nullopt, result};
return TestCase{kMathMin, list, std::nullopt, result};
}

TestCase MaxCase(CelValue v1, CelValue v2, CelValue result) {
return TestCase{kMathMax, v1, v2, result};
}

TestCase MaxCase(CelValue list, CelValue result) {
return TestCase{kMathMax, list, absl::nullopt, result};
return TestCase{kMathMax, list, std::nullopt, result};
}

struct MacroTestCase {
Expand Down
12 changes: 6 additions & 6 deletions extensions/proto_ext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ absl::optional<std::string> ValidateExtensionIdentifier(const Expr& expr) {
absl::Overload(
[](const SelectExpr& select_expr) -> absl::optional<std::string> {
if (select_expr.test_only()) {
return absl::nullopt;
return std::nullopt;
}
auto op_name = ValidateExtensionIdentifier(select_expr.operand());
if (!op_name.has_value()) {
return absl::nullopt;
return std::nullopt;
}
return absl::StrCat(*op_name, ".", select_expr.field());
},
[](const IdentExpr& ident_expr) -> absl::optional<std::string> {
return ident_expr.name();
},
[](const auto&) -> absl::optional<std::string> {
return absl::nullopt;
return std::nullopt;
}),
expr.kind());
}
Expand All @@ -68,7 +68,7 @@ absl::optional<std::string> GetExtensionFieldName(const Expr& expr) {
select_expr) {
return ValidateExtensionIdentifier(expr);
}
return absl::nullopt;
return std::nullopt;
}

bool IsExtensionCall(const Expr& target) {
Expand All @@ -95,7 +95,7 @@ std::vector<Macro> proto_macros() {
[](MacroExprFactory& factory, Expr& target,
absl::Span<Expr> arguments) -> absl::optional<Expr> {
if (!IsExtensionCall(target)) {
return absl::nullopt;
return std::nullopt;
}
auto extFieldName = GetExtensionFieldName(arguments[1]);
if (!extFieldName.has_value()) {
Expand All @@ -109,7 +109,7 @@ std::vector<Macro> proto_macros() {
[](MacroExprFactory& factory, Expr& target,
absl::Span<Expr> arguments) -> absl::optional<Expr> {
if (!IsExtensionCall(target)) {
return absl::nullopt;
return std::nullopt;
}
auto extFieldName = GetExtensionFieldName(arguments[1]);
if (!extFieldName.has_value()) {
Expand Down
Loading