Fix compilation error on CI (due to "possibly uninitialized field member").

This commit is contained in:
Christian Parpart 2019-11-01 13:43:06 +01:00 committed by Christian Parpart
parent 112e63fe15
commit cf82bc04d2

View File

@ -33,9 +33,10 @@ void ForLoopConditionIntoBody::operator()(ForLoop& _forLoop)
{ {
if (m_dialect.booleanNegationFunction() && _forLoop.condition->type() != typeid(Literal)) if (m_dialect.booleanNegationFunction() && _forLoop.condition->type() != typeid(Literal))
{ {
langutil::SourceLocation loc = locationOf(*_forLoop.condition); langutil::SourceLocation const loc = locationOf(*_forLoop.condition);
_forLoop.body.statements.insert(
_forLoop.body.statements.begin(), _forLoop.body.statements.emplace(
begin(_forLoop.body.statements),
If { If {
loc, loc,
make_unique<Expression>( make_unique<Expression>(