Skip to content

Commit 89a306b

Browse files
sam-githubrichardlau
authored andcommitted
deps: fix V8 compiler error with clang++-11
Fixes: #33040 error: type 'antlr4::tree::TerminalNode *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing] ParameterList result{{}, {}, context->VARARGS(), {}}; Occurs twice: ../../deps/v8/src/torque/ast-generator.cc:123:32: ../../deps/v8/src/torque/ast-generator.cc:144:32: PR-URL: #33094 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 9915774 commit 89a306b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
# Reset this number to 0 on major V8 upgrades.
3535
# Increment by one for each non-official patch applied to deps/v8.
36-
'v8_embedder_string': '-node.56',
36+
'v8_embedder_string': '-node.57',
3737

3838
# Enable disassembler for `--print-code` v8 options
3939
'v8_enable_disassembler': 1,

deps/v8/src/torque/ast-generator.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Statement* AstGenerator::GetOptionalHelperBody(
120120

121121
antlrcpp::Any AstGenerator::visitParameterList(
122122
TorqueParser::ParameterListContext* context) {
123-
ParameterList result{{}, {}, context->VARARGS(), {}};
123+
ParameterList result{{}, {}, context->VARARGS() != nullptr, {}};
124124
if (context->VARARGS()) {
125125
result.arguments_variable = context->IDENTIFIER()->getSymbol()->getText();
126126
}
@@ -141,7 +141,7 @@ antlrcpp::Any AstGenerator::visitTypeList(
141141

142142
antlrcpp::Any AstGenerator::visitTypeListMaybeVarArgs(
143143
TorqueParser::TypeListMaybeVarArgsContext* context) {
144-
ParameterList result{{}, {}, context->VARARGS(), {}};
144+
ParameterList result{{}, {}, context->VARARGS() != nullptr, {}};
145145
result.types.reserve(context->type().size());
146146
for (auto* type : context->type()) {
147147
result.types.push_back(GetType(type));

0 commit comments

Comments
 (0)