Commit 94946989 by David Malcolm

analyzer: delete checker_event::clone

checker_event has a clone vfunc implemented by all the concrete
subclasses, but this is never used (a holdover from a very early
implementation).  This patch deletes it.

gcc/analyzer/ChangeLog:
	* checker-path.h (checker_event::clone): Delete vfunc decl.
	(debug_event::clone): Delete vfunc impl.
	(custom_event::clone): Delete vfunc impl.
	(statement_event::clone): Delete vfunc impl.
	(function_entry_event::clone): Delete vfunc impl.
	(state_change_event::clone): Delete vfunc impl.
	(start_cfg_edge_event::clone): Delete vfunc impl.
	(end_cfg_edge_event::clone): Delete vfunc impl.
	(call_event::clone): Delete vfunc impl.
	(return_event::clone): Delete vfunc impl.
	(setjmp_event::clone): Delete vfunc impl.
	(rewind_from_longjmp_event::clone): Delete vfunc impl.
	(rewind_to_setjmp_event::clone): Delete vfunc impl.
	(warning_event::clone): Delete vfunc impl.
parent 718930c0
2020-01-14 David Malcolm <dmalcolm@redhat.com> 2020-01-14 David Malcolm <dmalcolm@redhat.com>
* checker-path.h (checker_event::clone): Delete vfunc decl.
(debug_event::clone): Delete vfunc impl.
(custom_event::clone): Delete vfunc impl.
(statement_event::clone): Delete vfunc impl.
(function_entry_event::clone): Delete vfunc impl.
(state_change_event::clone): Delete vfunc impl.
(start_cfg_edge_event::clone): Delete vfunc impl.
(end_cfg_edge_event::clone): Delete vfunc impl.
(call_event::clone): Delete vfunc impl.
(return_event::clone): Delete vfunc impl.
(setjmp_event::clone): Delete vfunc impl.
(rewind_from_longjmp_event::clone): Delete vfunc impl.
(rewind_to_setjmp_event::clone): Delete vfunc impl.
(warning_event::clone): Delete vfunc impl.
2020-01-14 David Malcolm <dmalcolm@redhat.com>
* supergraph.cc (supernode::dump_dot): Ensure that the TABLE * supergraph.cc (supernode::dump_dot): Ensure that the TABLE
element has at least one TR. element has at least one TR.
......
...@@ -88,8 +88,6 @@ public: ...@@ -88,8 +88,6 @@ public:
/* Additional functionality. */ /* Additional functionality. */
virtual checker_event *clone () const = 0;
virtual void prepare_for_emission (checker_path *, virtual void prepare_for_emission (checker_path *,
pending_diagnostic *pd, pending_diagnostic *pd,
diagnostic_event_id_t emission_id); diagnostic_event_id_t emission_id);
...@@ -128,11 +126,6 @@ public: ...@@ -128,11 +126,6 @@ public:
label_text get_desc (bool) const FINAL OVERRIDE; label_text get_desc (bool) const FINAL OVERRIDE;
checker_event *clone () const FINAL OVERRIDE
{
return new debug_event (m_loc, m_fndecl, m_depth, m_desc);
}
private: private:
char *m_desc; char *m_desc;
}; };
...@@ -156,11 +149,6 @@ public: ...@@ -156,11 +149,6 @@ public:
label_text get_desc (bool) const FINAL OVERRIDE; label_text get_desc (bool) const FINAL OVERRIDE;
checker_event *clone () const FINAL OVERRIDE
{
return new custom_event (m_loc, m_fndecl, m_depth, m_desc);
}
private: private:
char *m_desc; char *m_desc;
}; };
...@@ -176,11 +164,6 @@ public: ...@@ -176,11 +164,6 @@ public:
label_text get_desc (bool) const FINAL OVERRIDE; label_text get_desc (bool) const FINAL OVERRIDE;
checker_event *clone () const FINAL OVERRIDE
{
return new statement_event (m_stmt, m_fndecl, m_depth, m_dst_state);
}
const gimple * const m_stmt; const gimple * const m_stmt;
const program_state m_dst_state; const program_state m_dst_state;
}; };
...@@ -197,11 +180,6 @@ public: ...@@ -197,11 +180,6 @@ public:
label_text get_desc (bool can_colorize) const FINAL OVERRIDE; label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
checker_event *clone () const FINAL OVERRIDE
{
return new function_entry_event (m_loc, m_fndecl, m_depth);
}
bool is_function_entry_p () const FINAL OVERRIDE { return true; } bool is_function_entry_p () const FINAL OVERRIDE { return true; }
}; };
...@@ -221,13 +199,6 @@ public: ...@@ -221,13 +199,6 @@ public:
label_text get_desc (bool can_colorize) const FINAL OVERRIDE; label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
checker_event *clone () const FINAL OVERRIDE
{
return new state_change_event (m_node, m_stmt, m_depth,
m_sm, m_var, m_from, m_to, m_origin,
m_dst_state);
}
region_id get_lvalue (tree expr) const region_id get_lvalue (tree expr) const
{ {
return m_dst_state.m_region_model->get_lvalue (expr, NULL); return m_dst_state.m_region_model->get_lvalue (expr, NULL);
...@@ -302,11 +273,6 @@ public: ...@@ -302,11 +273,6 @@ public:
label_text get_desc (bool can_colorize) const FINAL OVERRIDE; label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
checker_event *clone () const FINAL OVERRIDE
{
return new start_cfg_edge_event (m_eedge, m_loc, m_fndecl, m_depth);
}
private: private:
label_text maybe_describe_condition (bool can_colorize) const; label_text maybe_describe_condition (bool can_colorize) const;
...@@ -333,11 +299,6 @@ public: ...@@ -333,11 +299,6 @@ public:
{ {
return label_text::borrow ("...to here"); return label_text::borrow ("...to here");
} }
checker_event *clone () const FINAL OVERRIDE
{
return new end_cfg_edge_event (m_eedge, m_loc, m_fndecl, m_depth);
}
}; };
/* A concrete event subclass for an interprocedural call. */ /* A concrete event subclass for an interprocedural call. */
...@@ -350,11 +311,6 @@ public: ...@@ -350,11 +311,6 @@ public:
label_text get_desc (bool can_colorize) const FINAL OVERRIDE; label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
checker_event *clone () const FINAL OVERRIDE
{
return new call_event (m_eedge, m_loc, m_fndecl, m_depth);
}
bool is_call_p () const FINAL OVERRIDE; bool is_call_p () const FINAL OVERRIDE;
}; };
...@@ -368,11 +324,6 @@ public: ...@@ -368,11 +324,6 @@ public:
label_text get_desc (bool can_colorize) const FINAL OVERRIDE; label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
checker_event *clone () const FINAL OVERRIDE
{
return new return_event (m_eedge, m_loc, m_fndecl, m_depth);
}
bool is_return_p () const FINAL OVERRIDE; bool is_return_p () const FINAL OVERRIDE;
}; };
...@@ -388,11 +339,6 @@ public: ...@@ -388,11 +339,6 @@ public:
{ {
} }
setjmp_event *clone () const FINAL OVERRIDE
{
return new setjmp_event (m_loc, m_enode, m_fndecl, m_depth);
}
label_text get_desc (bool can_colorize) const FINAL OVERRIDE; label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
void prepare_for_emission (checker_path *path, void prepare_for_emission (checker_path *path,
...@@ -436,12 +382,6 @@ public: ...@@ -436,12 +382,6 @@ public:
} }
label_text get_desc (bool can_colorize) const FINAL OVERRIDE; label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
rewind_from_longjmp_event *clone () const FINAL OVERRIDE
{
return new rewind_from_longjmp_event (get_eedge (),
m_loc, m_fndecl, m_depth);
}
}; };
/* A concrete event subclass for rewinding from a longjmp to a setjmp, /* A concrete event subclass for rewinding from a longjmp to a setjmp,
...@@ -460,13 +400,6 @@ public: ...@@ -460,13 +400,6 @@ public:
label_text get_desc (bool can_colorize) const FINAL OVERRIDE; label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
rewind_to_setjmp_event *clone () const FINAL OVERRIDE
{
return new rewind_to_setjmp_event (get_eedge (),
m_loc, m_fndecl, m_depth,
m_rewind_info);
}
void prepare_for_emission (checker_path *path, void prepare_for_emission (checker_path *path,
pending_diagnostic *pd, pending_diagnostic *pd,
diagnostic_event_id_t emission_id) FINAL OVERRIDE; diagnostic_event_id_t emission_id) FINAL OVERRIDE;
...@@ -494,11 +427,6 @@ public: ...@@ -494,11 +427,6 @@ public:
label_text get_desc (bool can_colorize) const FINAL OVERRIDE; label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
warning_event *clone () const FINAL OVERRIDE
{
return new warning_event (m_loc, m_fndecl, m_depth, m_sm, m_var, m_state);
}
private: private:
const state_machine *m_sm; const state_machine *m_sm;
tree m_var; tree m_var;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment