+2020-01-30 David Malcolm <dmalcolm@redhat.com>
+
+ * diagnostic-manager.cc (for_each_state_change): Use
+ extrinsic_state::get_num_checkers rather than accessing m_checkers
+ directly.
+ * program-state.cc (program_state::program_state): Likewise.
+ * program-state.h (extrinsic_state::m_checkers): Make private.
+
2020-01-30 David Malcolm <dmalcolm@redhat.com>
PR analyzer/93356
state_change_visitor *visitor)
{
gcc_assert (src_state.m_checker_states.length ()
- == ext_state.m_checkers.length ());
+ == ext_state.get_num_checkers ());
gcc_assert (dst_state.m_checker_states.length ()
- == ext_state.m_checkers.length ());
- for (unsigned i = 0; i < ext_state.m_checkers.length (); i++)
+ == ext_state.get_num_checkers ());
+ for (unsigned i = 0; i < ext_state.get_num_checkers (); i++)
{
const state_machine &sm = ext_state.get_sm (i);
const sm_state_map &src_smap = *src_state.m_checker_states[i];
program_state::program_state (const extrinsic_state &ext_state)
: m_region_model (new region_model ()),
- m_checker_states (ext_state.m_checkers.length ())
+ m_checker_states (ext_state.get_num_checkers ())
{
- int num_states = ext_state.m_checkers.length ();
+ int num_states = ext_state.get_num_checkers ();
for (int i = 0; i < num_states; i++)
m_checker_states.quick_push (new sm_state_map ());
}
unsigned get_num_checkers () const { return m_checkers.length (); }
+private:
/* The state machines. */
auto_delete_vec <state_machine> &m_checkers;
};