Skip to content

Commit 05d1c92

Browse files
committed
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:
1 parent a85721a commit 05d1c92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
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)