Skip to content

Commit 89d81b2

Browse files
authored
Merge pull request #133 from google/cpp-sync
OSS export
2 parents 80d1126 + bff2242 commit 89d81b2

File tree

6 files changed

+21
-149
lines changed

6 files changed

+21
-149
lines changed

bazel/deps.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
77
def base_deps():
88
"""Base evaluator and test dependencies."""
99

10-
# LTS, March 2021, Patch 2
11-
ABSL_SHA1 = "278e0a071885a22dcd2fd1b5576cc44757299343"
12-
ABSL_SHA256 = "ff5ea6f91f9bcd0f368346ef707d0a80a372b71de5b6ae69ac11d0ca41688b8f"
10+
# 2021-10-05
11+
ABSL_SHA1 = "b9b925341f9e90f5e7aa0cf23f036c29c7e454eb"
12+
ABSL_SHA256 = "bb2a0b57c92b6666e8acb00f4cbbfce6ddb87e83625fb851b0e78db581340617"
1313
http_archive(
1414
name = "com_google_absl",
1515
urls = ["https://github.com/abseil/abseil-cpp/archive/" + ABSL_SHA1 + ".zip"],

eval/public/ast_traverse.cc

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,25 @@ struct StackRecord {
5959
static constexpr int kNotCallArg = -1;
6060
static constexpr int kTarget = -2;
6161

62-
StackRecord(const Expr* e, const SourceInfo* info)
63-
: record_variant(ExprRecord{.expr = e, .source_info = info}),
64-
visited(false) {}
62+
StackRecord(const Expr* e, const SourceInfo* info) {
63+
ExprRecord record;
64+
record.expr = e;
65+
record.source_info = info;
66+
record_variant = record;
67+
}
6568

6669
StackRecord(const Expr* e, const SourceInfo* info, const Expr* call,
67-
int argnum)
68-
: record_variant(ArgRecord{.expr = e,
69-
.source_info = info,
70-
.calling_expr = call,
71-
.call_arg = argnum}),
72-
visited(false) {}
70+
int argnum) {
71+
ArgRecord record;
72+
record.expr = e;
73+
record.source_info = info;
74+
record.calling_expr = call;
75+
record.call_arg = argnum;
76+
record_variant = record;
77+
}
7378

7479
StackRecordKind record_variant;
75-
bool visited;
80+
bool visited = false;
7681
};
7782

7883
struct PreVisitor {

eval/public/cel_value.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ std::string CelValue::TypeName(Type value_type) {
156156
return "CelError";
157157
case Type::kAny:
158158
return "Any type";
159+
default:
160+
return "unknown";
159161
}
160162
}
161163

@@ -209,7 +211,7 @@ CelValue CelValue::ObtainCelType() const {
209211
return *this;
210212
case Type::kError:
211213
return *this;
212-
case Type::kAny: {
214+
default: {
213215
static const CelError* invalid_type_error =
214216
new CelError(absl::InvalidArgumentError("Unsupported CelValue type"));
215217
return CreateError(invalid_type_error);

internal/BUILD

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,6 @@ cc_library(
3131
],
3232
)
3333

34-
cc_library(
35-
name = "status_util",
36-
srcs = ["status_util.cc"],
37-
hdrs = [
38-
"status_util.h",
39-
],
40-
deps = [
41-
"@com_google_absl//absl/strings",
42-
"@com_google_googleapis//google/rpc:code_cc_proto",
43-
"@com_google_googleapis//google/rpc:status_cc_proto",
44-
],
45-
)
46-
4734
cc_library(
4835
name = "proto_util",
4936
srcs = ["proto_util.cc"],

internal/status_util.cc

Lines changed: 0 additions & 75 deletions
This file was deleted.

internal/status_util.h

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)