From 48a768814b93315d664870cf4095fc4a90e29ac7 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 27 Apr 2020 08:19:00 -0700 Subject: [PATCH] deps: fix V8 compiler error with clang++-11 Fixes: https://github.com/nodejs/node/issues/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: --- common.gypi | 2 +- deps/v8/src/torque/ast-generator.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common.gypi b/common.gypi index 32499f8e3f6361..7ec4bff15806c4 100644 --- a/common.gypi +++ b/common.gypi @@ -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, diff --git a/deps/v8/src/torque/ast-generator.cc b/deps/v8/src/torque/ast-generator.cc index 617afd1485d1a0..65e465dda2f731 100644 --- a/deps/v8/src/torque/ast-generator.cc +++ b/deps/v8/src/torque/ast-generator.cc @@ -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(); } @@ -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));