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: nodejs#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:
  • Loading branch information
sam-github committed Apr 27, 2020
1 parent a85721a commit 05d1c92
Showing 1 changed file with 2 additions and 2 deletions.
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 05d1c92

Please sign in to comment.