analyzer: fix program_point::get_next for PK_BEFORE_STMT

gcc/analyzer/ChangeLog:
	* program-point.cc (program_point::get_next): Fix missing
	increment of index.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
This commit is contained in:
David Malcolm 2022-03-17 12:08:44 -04:00
parent c482c28ba4
commit 2b3404357a

View file

@ -645,7 +645,7 @@ program_point::get_next () const
return after_supernode (get_supernode (), get_call_string ());
case PK_BEFORE_STMT:
{
unsigned next_idx = get_stmt_idx ();
unsigned next_idx = get_stmt_idx () + 1;
if (next_idx < get_supernode ()->m_stmts.length ())
return before_stmt (get_supernode (), next_idx, get_call_string ());
else