public:
gil_state_machine (logger *logger);
- bool inherited_state_p () const FINAL OVERRIDE { return false; }
+ bool inherited_state_p () const final override { return false; }
bool on_stmt (sm_context *sm_ctxt,
const supernode *node,
- const gimple *stmt) const FINAL OVERRIDE;
+ const gimple *stmt) const final override;
- bool can_purge_p (state_t s) const FINAL OVERRIDE;
+ bool can_purge_p (state_t s) const final override;
void check_for_pyobject_usage_without_gil (sm_context *sm_ctxt,
const supernode *node,
{
public:
/* There isn't a warning ID for us to use. */
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return 0;
}
- location_t fixup_location (location_t loc) const FINAL OVERRIDE
+ location_t fixup_location (location_t loc) const final override
{
/* Ideally we'd check for specific macros here, and only
resolve certain macros. */
}
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (change.is_global_p ()
&& change.m_new_state == m_sm.m_released_gil)
: gil_diagnostic (sm), m_call (call)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "double_save_thread";
}
- bool subclass_equal_p (const pending_diagnostic &base_other) const OVERRIDE
+ bool subclass_equal_p (const pending_diagnostic &base_other) const override
{
const double_save_thread &sub_other
= (const double_save_thread &)base_other;
return m_call == sub_other.m_call;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
return warning_at (rich_loc, get_controlling_option (),
"nested usage of %qs", "Py_BEGIN_ALLOW_THREADS");
}
- label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
+ label_text describe_final_event (const evdesc::final_event &ev) final override
{
return ev.formatted_print ("nested usage of %qs here",
"Py_BEGIN_ALLOW_THREADS");
m_arg_idx (arg_idx)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "fncall_without_gil";
}
- bool subclass_equal_p (const pending_diagnostic &base_other) const OVERRIDE
+ bool subclass_equal_p (const pending_diagnostic &base_other) const override
{
const fncall_without_gil &sub_other
= (const fncall_without_gil &)base_other;
&& m_arg_idx == sub_other.m_arg_idx);
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
auto_diagnostic_group d;
if (m_callee_fndecl)
m_arg_idx + 1, m_callee_fndecl);
}
- label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
+ label_text describe_final_event (const evdesc::final_event &ev) final override
{
if (m_callee_fndecl)
return ev.formatted_print ("use of PyObject as argument %i of %qE here"
: gil_diagnostic (sm), m_expr (expr)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "pyobject_usage_without_gil";
}
- bool subclass_equal_p (const pending_diagnostic &base_other) const OVERRIDE
+ bool subclass_equal_p (const pending_diagnostic &base_other) const override
{
return same_tree_p (m_expr,
((const pyobject_usage_without_gil&)base_other).m_expr);
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
auto_diagnostic_group d;
return warning_at (rich_loc, get_controlling_option (),
"use of PyObject %qE without the GIL", m_expr);
}
- label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
+ label_text describe_final_event (const evdesc::final_event &ev) final override
{
return ev.formatted_print ("PyObject %qE used here without the GIL",
m_expr);