Skip to content

Commit ef57455

Browse files
CEL Dev Teamcopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 934677950
1 parent 83ccadf commit ef57455

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

extensions/bindings_ext.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ std::vector<Macro> bindings_macros() {
7373
[](MacroExprFactory& factory, Expr& target,
7474
absl::Span<Expr> args) -> absl::optional<Expr> {
7575
if (!IsTargetNamespace(target)) {
76-
return absl::nullopt;
76+
return std::nullopt;
7777
}
7878
if (!args[0].has_ident_expr()) {
7979
return factory.ReportErrorAt(

extensions/lists_functions.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ Macro ListSortByMacro() {
454454
MakeMapComprehension(factory, factory.Copy(sortby_input_ident),
455455
std::move(key_ident), std::move(key_expr));
456456
if (!map_compr.has_value()) {
457-
return absl::nullopt;
457+
return std::nullopt;
458458
}
459459

460460
// Build the call expression:

extensions/math_ext_macros.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ absl::optional<Expr> CheckInvalidArgs(MacroExprFactory &factory,
7272
}
7373
}
7474

75-
return absl::nullopt;
75+
return std::nullopt;
7676
}
7777

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

105105
switch (arguments.size()) {
@@ -143,7 +143,7 @@ std::vector<Macro> math_macros() {
143143
[](MacroExprFactory &factory, Expr &target,
144144
absl::Span<Expr> arguments) -> absl::optional<Expr> {
145145
if (!IsTargetNamespace(target)) {
146-
return absl::nullopt;
146+
return std::nullopt;
147147
}
148148

149149
switch (arguments.size()) {

extensions/math_ext_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ TestCase MinCase(CelValue v1, CelValue v2, CelValue result) {
9393
}
9494

9595
TestCase MinCase(CelValue list, CelValue result) {
96-
return TestCase{kMathMin, list, absl::nullopt, result};
96+
return TestCase{kMathMin, list, std::nullopt, result};
9797
}
9898

9999
TestCase MaxCase(CelValue v1, CelValue v2, CelValue result) {
100100
return TestCase{kMathMax, v1, v2, result};
101101
}
102102

103103
TestCase MaxCase(CelValue list, CelValue result) {
104-
return TestCase{kMathMax, list, absl::nullopt, result};
104+
return TestCase{kMathMax, list, std::nullopt, result};
105105
}
106106

107107
struct MacroTestCase {

extensions/proto_ext.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ absl::optional<std::string> ValidateExtensionIdentifier(const Expr& expr) {
4545
absl::Overload(
4646
[](const SelectExpr& select_expr) -> absl::optional<std::string> {
4747
if (select_expr.test_only()) {
48-
return absl::nullopt;
48+
return std::nullopt;
4949
}
5050
auto op_name = ValidateExtensionIdentifier(select_expr.operand());
5151
if (!op_name.has_value()) {
52-
return absl::nullopt;
52+
return std::nullopt;
5353
}
5454
return absl::StrCat(*op_name, ".", select_expr.field());
5555
},
5656
[](const IdentExpr& ident_expr) -> absl::optional<std::string> {
5757
return ident_expr.name();
5858
},
5959
[](const auto&) -> absl::optional<std::string> {
60-
return absl::nullopt;
60+
return std::nullopt;
6161
}),
6262
expr.kind());
6363
}
@@ -68,7 +68,7 @@ absl::optional<std::string> GetExtensionFieldName(const Expr& expr) {
6868
select_expr) {
6969
return ValidateExtensionIdentifier(expr);
7070
}
71-
return absl::nullopt;
71+
return std::nullopt;
7272
}
7373

7474
bool IsExtensionCall(const Expr& target) {
@@ -95,7 +95,7 @@ std::vector<Macro> proto_macros() {
9595
[](MacroExprFactory& factory, Expr& target,
9696
absl::Span<Expr> arguments) -> absl::optional<Expr> {
9797
if (!IsExtensionCall(target)) {
98-
return absl::nullopt;
98+
return std::nullopt;
9999
}
100100
auto extFieldName = GetExtensionFieldName(arguments[1]);
101101
if (!extFieldName.has_value()) {
@@ -109,7 +109,7 @@ std::vector<Macro> proto_macros() {
109109
[](MacroExprFactory& factory, Expr& target,
110110
absl::Span<Expr> arguments) -> absl::optional<Expr> {
111111
if (!IsExtensionCall(target)) {
112-
return absl::nullopt;
112+
return std::nullopt;
113113
}
114114
auto extFieldName = GetExtensionFieldName(arguments[1]);
115115
if (!extFieldName.has_value()) {

0 commit comments

Comments
 (0)