Skip to content

Commit

Permalink
deps: fix V8 compiler error with clang++-11
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sam-github authored and richardlau committed Jul 1, 2020
1 parent 9915774 commit 89a306b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

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

# Enable disassembler for `--print-code` v8 options
'v8_enable_disassembler': 1,
Expand Down
4 changes: 2 additions & 2 deletions deps/v8/src/torque/ast-generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Statement* AstGenerator::GetOptionalHelperBody(

antlrcpp::Any AstGenerator::visitParameterList(
TorqueParser::ParameterListContext* context) {
ParameterList result{{}, {}, context->VARARGS(), {}};
ParameterList result{{}, {}, context->VARARGS() != nullptr, {}};
if (context->VARARGS()) {
result.arguments_variable = context->IDENTIFIER()->getSymbol()->getText();
}
Expand All @@ -141,7 +141,7 @@ antlrcpp::Any AstGenerator::visitTypeList(

antlrcpp::Any AstGenerator::visitTypeListMaybeVarArgs(
TorqueParser::TypeListMaybeVarArgsContext* context) {
ParameterList result{{}, {}, context->VARARGS(), {}};
ParameterList result{{}, {}, context->VARARGS() != nullptr, {}};
result.types.reserve(context->type().size());
for (auto* type : context->type()) {
result.types.push_back(GetType(type));
Expand Down

0 comments on commit 89a306b

Please sign in to comment.