chain->safe_push (cond);
}
else if (!c_parser_next_token_is_keyword (parser, RID_IF))
- {
- /* This is if-else without subsequent if. Zap the condition
- chain; we would have already warned at this point. */
- delete chain;
- chain = NULL;
- }
+ /* This is if-else without subsequent if. Zap the condition
+ chain; we would have already warned at this point. */
+ vec_free (chain);
}
second_body = c_parser_else_body (parser, else_tinfo, chain);
/* Set IF_P to true to indicate that this if statement has an
"suggest explicit braces to avoid ambiguous %<else%>");
if (warn_duplicated_cond)
- {
- /* This if statement does not have an else clause. We don't
- need the condition chain anymore. */
- delete chain;
- chain = NULL;
- }
+ /* This if statement does not have an else clause. We don't
+ need the condition chain anymore. */
+ vec_free (chain);
}
c_finish_if_stmt (loc, cond, first_body, second_body);
add_stmt (c_end_compound_stmt (loc, block, flag_isoc99));
"init-statement in selection statements only available "
"with %<-std=c++17%> or %<-std=gnu++17%>");
if (cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON))
- {
- /* A non-empty init-statement can have arbitrary side
- effects. */
- delete chain;
- chain = NULL;
- }
+ /* A non-empty init-statement can have arbitrary side
+ effects. */
+ vec_free (chain);
cp_parser_init_statement (parser, &decl);
}
}
else if (!cp_lexer_next_token_is_keyword (parser->lexer,
RID_IF))
- {
- /* This is if-else without subsequent if. Zap the
- condition chain; we would have already warned at
- this point. */
- delete chain;
- chain = NULL;
- }
+ /* This is if-else without subsequent if. Zap the
+ condition chain; we would have already warned at
+ this point. */
+ vec_free (chain);
}
begin_else_clause (statement);
/* Parse the else-clause. */
"suggest explicit braces to avoid ambiguous"
" %<else%>");
if (warn_duplicated_cond)
- {
- /* We don't need the condition chain anymore. */
- delete chain;
- chain = NULL;
- }
+ /* We don't need the condition chain anymore. */
+ vec_free (chain);
}
/* Now we're all done with the if-statement. */