@@ -66,8 +66,8 @@ public:
{}
/* opt_pass methods: */
- bool gate (function *) FINAL OVERRIDE;
- unsigned int execute (function *) FINAL OVERRIDE;
+ bool gate (function *) final override;
+ unsigned int execute (function *) final override;
}; // class pass_analyzer
/* Only run the analyzer if -fanalyzer. */
@@ -30,9 +30,9 @@ namespace ana {
class call_info : public custom_edge_info
{
public:
- void print (pretty_printer *pp) const FINAL OVERRIDE;
+ void print (pretty_printer *pp) const final override;
void add_events_to_path (checker_path *emission_path,
- const exploded_edge &eedge) const FINAL OVERRIDE;
+ const exploded_edge &eedge) const final override;
const gcall *get_call_stmt () const { return m_call_stmt; }
tree get_fndecl () const { return m_fndecl; }
@@ -58,7 +58,7 @@ private:
class success_call_info : public call_info
{
public:
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
+ label_text get_desc (bool can_colorize) const final override;
protected:
success_call_info (const call_details &cd) : call_info (cd) {}
@@ -72,7 +72,7 @@ protected:
class failed_call_info : public call_info
{
public:
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
+ label_text get_desc (bool can_colorize) const final override;
protected:
failed_call_info (const call_details &cd) : call_info (cd) {}
@@ -91,9 +91,9 @@ public:
/* Implementation of diagnostic_event. */
- location_t get_location () const FINAL OVERRIDE { return m_loc; }
- tree get_fndecl () const FINAL OVERRIDE { return m_fndecl; }
- int get_stack_depth () const FINAL OVERRIDE { return m_depth; }
+ location_t get_location () const final override { return m_loc; }
+ tree get_fndecl () const final override { return m_fndecl; }
+ int get_stack_depth () const final override { return m_depth; }
/* Additional functionality. */
@@ -141,7 +141,7 @@ public:
free (m_desc);
}
- label_text get_desc (bool) const FINAL OVERRIDE;
+ label_text get_desc (bool) const final override;
private:
char *m_desc;
@@ -175,7 +175,7 @@ public:
free (m_desc);
}
- label_text get_desc (bool) const FINAL OVERRIDE;
+ label_text get_desc (bool) const final override;
private:
char *m_desc;
@@ -190,7 +190,7 @@ public:
statement_event (const gimple *stmt, tree fndecl, int depth,
const program_state &dst_state);
- label_text get_desc (bool) const FINAL OVERRIDE;
+ label_text get_desc (bool) const final override;
const gimple * const m_stmt;
const program_state m_dst_state;
@@ -205,7 +205,7 @@ public:
region_creation_event (const region *reg,
location_t loc, tree fndecl, int depth);
- label_text get_desc (bool) const FINAL OVERRIDE;
+ label_text get_desc (bool) const final override;
private:
const region *m_reg;
@@ -221,9 +221,9 @@ public:
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
+ label_text get_desc (bool can_colorize) const final override;
- bool is_function_entry_p () const FINAL OVERRIDE { return true; }
+ bool is_function_entry_p () const final override { return true; }
};
/* Subclass of checker_event describing a state change. */
@@ -240,7 +240,7 @@ public:
const svalue *origin,
const program_state &dst_state);
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
+ label_text get_desc (bool can_colorize) const final override;
function *get_dest_function () const
{
@@ -314,7 +314,7 @@ public:
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
+ label_text get_desc (bool can_colorize) const final override;
private:
label_text maybe_describe_condition (bool can_colorize) const;
@@ -338,7 +338,7 @@ public:
{
}
- label_text get_desc (bool /*can_colorize*/) const FINAL OVERRIDE
+ label_text get_desc (bool /*can_colorize*/) const final override
{
return label_text::borrow ("...to here");
}
@@ -352,9 +352,9 @@ public:
call_event (const exploded_edge &eedge,
location_t loc, tree fndecl, int depth);
- label_text get_desc (bool can_colorize) const OVERRIDE;
+ label_text get_desc (bool can_colorize) const override;
- bool is_call_p () const FINAL OVERRIDE;
+ bool is_call_p () const final override;
protected:
tree get_caller_fndecl () const;
@@ -372,9 +372,9 @@ public:
return_event (const exploded_edge &eedge,
location_t loc, tree fndecl, int depth);
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
+ label_text get_desc (bool can_colorize) const final override;
- bool is_return_p () const FINAL OVERRIDE;
+ bool is_return_p () const final override;
const supernode *m_src_snode;
const supernode *m_dest_snode;
@@ -393,7 +393,7 @@ public:
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
+ label_text get_desc (bool can_colorize) const final override;
private:
bool m_edge_sense;
@@ -410,7 +410,7 @@ public:
{
}
- label_text get_desc (bool /*can_colorize*/) const FINAL OVERRIDE
+ label_text get_desc (bool /*can_colorize*/) const final override
{
return label_text::borrow ("...to here");
}
@@ -428,11 +428,11 @@ public:
{
}
- 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,
pending_diagnostic *pd,
- diagnostic_event_id_t emission_id) FINAL OVERRIDE;
+ diagnostic_event_id_t emission_id) final override;
private:
const exploded_node *m_enode;
@@ -477,7 +477,7 @@ public:
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
+ label_text get_desc (bool can_colorize) const final override;
};
/* A concrete event subclass for rewinding from a longjmp to a setjmp,
@@ -494,11 +494,11 @@ public:
{
}
- 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,
pending_diagnostic *pd,
- diagnostic_event_id_t emission_id) FINAL OVERRIDE;
+ diagnostic_event_id_t emission_id) final override;
private:
diagnostic_event_id_t m_original_setjmp_event_id;
@@ -520,7 +520,7 @@ public:
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE;
+ label_text get_desc (bool can_colorize) const final override;
private:
const state_machine *m_sm;
@@ -537,12 +537,12 @@ public:
/* Implementation of diagnostic_path vfuncs. */
- unsigned num_events () const FINAL OVERRIDE
+ unsigned num_events () const final override
{
return m_events.length ();
}
- const diagnostic_event & get_event (int idx) const FINAL OVERRIDE
+ const diagnostic_event & get_event (int idx) const final override
{
return *m_events[idx];
}
@@ -2905,7 +2905,7 @@ public:
{}
void on_fact (const svalue *lhs, enum tree_code code, const svalue *rhs)
- FINAL OVERRIDE
+ final override
{
/* Special-case for widening. */
if (lhs->get_kind () == SK_WIDENING)
@@ -2933,7 +2933,7 @@ public:
}
void on_ranges (const svalue *lhs_sval,
- const bounded_ranges *ranges) FINAL OVERRIDE
+ const bounded_ranges *ranges) final override
{
for (const auto &iter : m_cm_b->m_bounded_ranges_constraints)
{
@@ -565,7 +565,7 @@ public:
}
void dump_extra_info (const exploded_node *enode,
- pretty_printer *pp) const FINAL OVERRIDE
+ pretty_printer *pp) const final override
{
pp_printf (pp, "sp: %i", m_sep.get_shortest_path (enode).length ());
pp_newline (pp);
@@ -1430,7 +1430,7 @@ public:
bool on_global_state_change (const state_machine &sm,
state_machine::state_t src_sm_val,
state_machine::state_t dst_sm_val)
- FINAL OVERRIDE
+ final override
{
if (&sm != m_pb.get_sm ())
return false;
@@ -1460,7 +1460,7 @@ public:
state_machine::state_t src_sm_val,
state_machine::state_t dst_sm_val,
const svalue *sval,
- const svalue *dst_origin_sval) FINAL OVERRIDE
+ const svalue *dst_origin_sval) final override
{
if (&sm != m_pb.get_sm ())
return false;
@@ -1588,13 +1588,13 @@ struct null_assignment_sm_context : public sm_context
{
}
- tree get_fndecl_for_call (const gcall */*call*/) FINAL OVERRIDE
+ tree get_fndecl_for_call (const gcall */*call*/) final override
{
return NULL_TREE;
}
state_machine::state_t get_state (const gimple *stmt ATTRIBUTE_UNUSED,
- tree var) FINAL OVERRIDE
+ tree var) final override
{
const svalue *var_old_sval
= m_old_state->m_region_model->get_rvalue (var, NULL);
@@ -1607,7 +1607,7 @@ struct null_assignment_sm_context : public sm_context
}
state_machine::state_t get_state (const gimple *stmt ATTRIBUTE_UNUSED,
- const svalue *sval) FINAL OVERRIDE
+ const svalue *sval) final override
{
const sm_state_map *old_smap = m_old_state->m_checker_states[m_sm_idx];
state_machine::state_t current = old_smap->get_state (sval, m_ext_state);
@@ -1617,7 +1617,7 @@ struct null_assignment_sm_context : public sm_context
void set_next_state (const gimple *stmt,
tree var,
state_machine::state_t to,
- tree origin ATTRIBUTE_UNUSED) FINAL OVERRIDE
+ tree origin ATTRIBUTE_UNUSED) final override
{
state_machine::state_t from = get_state (stmt, var);
if (from != m_sm.get_start_state ())
@@ -1641,7 +1641,7 @@ struct null_assignment_sm_context : public sm_context
void set_next_state (const gimple *stmt,
const svalue *sval,
state_machine::state_t to,
- tree origin ATTRIBUTE_UNUSED) FINAL OVERRIDE
+ tree origin ATTRIBUTE_UNUSED) final override
{
state_machine::state_t from = get_state (stmt, sval);
if (from != m_sm.get_start_state ())
@@ -1661,41 +1661,41 @@ struct null_assignment_sm_context : public sm_context
}
void warn (const supernode *, const gimple *,
- tree, pending_diagnostic *d) FINAL OVERRIDE
+ tree, pending_diagnostic *d) final override
{
delete d;
}
void warn (const supernode *, const gimple *,
- const svalue *, pending_diagnostic *d) FINAL OVERRIDE
+ const svalue *, pending_diagnostic *d) final override
{
delete d;
}
- tree get_diagnostic_tree (tree expr) FINAL OVERRIDE
+ tree get_diagnostic_tree (tree expr) final override
{
return expr;
}
- tree get_diagnostic_tree (const svalue *sval) FINAL OVERRIDE
+ tree get_diagnostic_tree (const svalue *sval) final override
{
return m_new_state->m_region_model->get_representative_tree (sval);
}
- state_machine::state_t get_global_state () const FINAL OVERRIDE
+ state_machine::state_t get_global_state () const final override
{
return 0;
}
- void set_global_state (state_machine::state_t) FINAL OVERRIDE
+ void set_global_state (state_machine::state_t) final override
{
/* No-op. */
}
- void on_custom_transition (custom_transition *) FINAL OVERRIDE
+ void on_custom_transition (custom_transition *) final override
{
}
- tree is_zero_assignment (const gimple *stmt) FINAL OVERRIDE
+ tree is_zero_assignment (const gimple *stmt) final override
{
const gassign *assign_stmt = dyn_cast <const gassign *> (stmt);
if (!assign_stmt)
@@ -1708,11 +1708,11 @@ struct null_assignment_sm_context : public sm_context
return NULL_TREE;
}
- const program_state *get_old_program_state () const FINAL OVERRIDE
+ const program_state *get_old_program_state () const final override
{
return m_old_state;
}
- const program_state *get_new_program_state () const FINAL OVERRIDE
+ const program_state *get_new_program_state () const final override
{
return m_new_state;
}
@@ -318,7 +318,7 @@ public:
logger *get_logger () const { return m_logger.get_logger (); }
- tree get_fndecl_for_call (const gcall *call) FINAL OVERRIDE
+ tree get_fndecl_for_call (const gcall *call) final override
{
impl_region_model_context old_ctxt
(m_eg, m_enode_for_diag, NULL, NULL, NULL/*m_enode->get_state ()*/,
@@ -417,7 +417,7 @@ public:
}
void warn (const supernode *snode, const gimple *stmt,
- tree var, pending_diagnostic *d) FINAL OVERRIDE
+ tree var, pending_diagnostic *d) final override
{
LOG_FUNC (get_logger ());
gcc_assert (d); // take ownership
@@ -436,7 +436,7 @@ public:
}
void warn (const supernode *snode, const gimple *stmt,
- const svalue *sval, pending_diagnostic *d) FINAL OVERRIDE
+ const svalue *sval, pending_diagnostic *d) final override
{
LOG_FUNC (get_logger ());
gcc_assert (d); // take ownership
@@ -458,7 +458,7 @@ public:
we can print:
"double-free of 'inbuf.data'". */
- tree get_diagnostic_tree (tree expr) FINAL OVERRIDE
+ tree get_diagnostic_tree (tree expr) final override
{
/* Only for SSA_NAMEs of temporaries; otherwise, return EXPR, as it's
likely to be the least surprising tree to report. */
@@ -476,29 +476,29 @@ public:
return expr;
}
- tree get_diagnostic_tree (const svalue *sval) FINAL OVERRIDE
+ tree get_diagnostic_tree (const svalue *sval) final override
{
return m_new_state->m_region_model->get_representative_tree (sval);
}
- state_machine::state_t get_global_state () const FINAL OVERRIDE
+ state_machine::state_t get_global_state () const final override
{
return m_old_state->m_checker_states[m_sm_idx]->get_global_state ();
}
- void set_global_state (state_machine::state_t state) FINAL OVERRIDE
+ void set_global_state (state_machine::state_t state) final override
{
m_new_state->m_checker_states[m_sm_idx]->set_global_state (state);
}
- void on_custom_transition (custom_transition *transition) FINAL OVERRIDE
+ void on_custom_transition (custom_transition *transition) final override
{
transition->impl_transition (&m_eg,
const_cast<exploded_node *> (m_enode_for_diag),
m_sm_idx);
}
- tree is_zero_assignment (const gimple *stmt) FINAL OVERRIDE
+ tree is_zero_assignment (const gimple *stmt) final override
{
const gassign *assign_stmt = dyn_cast <const gassign *> (stmt);
if (!assign_stmt)
@@ -514,22 +514,22 @@ public:
return NULL_TREE;
}
- path_context *get_path_context () const FINAL OVERRIDE
+ path_context *get_path_context () const final override
{
return m_path_ctxt;
}
- bool unknown_side_effects_p () const FINAL OVERRIDE
+ bool unknown_side_effects_p () const final override
{
return m_unknown_side_effects;
}
- const program_state *get_old_program_state () const FINAL OVERRIDE
+ const program_state *get_old_program_state () const final override
{
return m_old_state;
}
- const program_state *get_new_program_state () const FINAL OVERRIDE
+ const program_state *get_new_program_state () const final override
{
return m_new_state;
}
@@ -557,13 +557,13 @@ public:
leak_stmt_finder (const exploded_graph &eg, tree var)
: m_eg (eg), m_var (var) {}
- stmt_finder *clone () const FINAL OVERRIDE
+ stmt_finder *clone () const final override
{
return new leak_stmt_finder (m_eg, m_var);
}
const gimple *find_stmt (const exploded_path &epath)
- FINAL OVERRIDE
+ final override
{
logger * const logger = m_eg.get_logger ();
LOG_FUNC (logger);
@@ -1545,12 +1545,12 @@ public:
m_setjmp_point (setjmp_point), m_stack_pop_event (NULL)
{}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_stale_setjmp_buffer;
}
- bool emit (rich_location *richloc) FINAL OVERRIDE
+ bool emit (rich_location *richloc) final override
{
return warning_at
(richloc, get_controlling_option (),
@@ -1559,7 +1559,7 @@ public:
get_user_facing_name (m_setjmp_call));
}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{ return "stale_jmp_buf"; }
bool operator== (const stale_jmp_buf &other) const
@@ -1571,7 +1571,7 @@ public:
bool
maybe_add_custom_events_for_superedge (const exploded_edge &eedge,
checker_path *emission_path)
- FINAL OVERRIDE
+ final override
{
/* Detect exactly when the stack first becomes invalid,
and issue an event then. */
@@ -2435,7 +2435,7 @@ public:
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE
+ label_text get_desc (bool can_colorize) const final override
{
return make_label_text
(can_colorize,
@@ -2457,21 +2457,21 @@ public:
: m_fndecl (fndecl)
{}
- void print (pretty_printer *pp) const FINAL OVERRIDE
+ void print (pretty_printer *pp) const final override
{
pp_string (pp, "call to tainted_args function");
};
bool update_model (region_model *,
const exploded_edge *,
- region_model_context *) const FINAL OVERRIDE
+ region_model_context *) const final override
{
/* No-op. */
return true;
}
void add_events_to_path (checker_path *emission_path,
- const exploded_edge &) const FINAL OVERRIDE
+ const exploded_edge &) const final override
{
emission_path->add_event
(new tainted_args_function_custom_event
@@ -2852,7 +2852,7 @@ public:
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE
+ label_text get_desc (bool can_colorize) const final override
{
return make_label_text (can_colorize,
"field %qE of %qT"
@@ -2878,7 +2878,7 @@ public:
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE
+ label_text get_desc (bool can_colorize) const final override
{
return make_label_text (can_colorize,
"function %qE used as initializer for field %qE"
@@ -2900,21 +2900,21 @@ public:
: m_field (field), m_fndecl (fndecl), m_loc (loc)
{}
- void print (pretty_printer *pp) const FINAL OVERRIDE
+ void print (pretty_printer *pp) const final override
{
pp_string (pp, "call to tainted field");
};
bool update_model (region_model *,
const exploded_edge *,
- region_model_context *) const FINAL OVERRIDE
+ region_model_context *) const final override
{
/* No-op. */
return true;
}
void add_events_to_path (checker_path *emission_path,
- const exploded_edge &) const FINAL OVERRIDE
+ const exploded_edge &) const final override
{
/* Show the field in the struct declaration, e.g.
"(1) field 'store' is marked with '__attribute__((tainted_args))'" */
@@ -3611,7 +3611,7 @@ public:
}
void
- bifurcate (custom_edge_info *info) FINAL OVERRIDE
+ bifurcate (custom_edge_info *info) final override
{
if (m_state_at_bifurcation)
/* Verify that the state at bifurcation is consistent when we
@@ -3627,12 +3627,12 @@ public:
m_custom_eedge_infos.safe_push (info);
}
- void terminate_path () FINAL OVERRIDE
+ void terminate_path () final override
{
m_terminate_path = true;
}
- bool terminate_path_p () const FINAL OVERRIDE
+ bool terminate_path_p () const final override
{
return m_terminate_path;
}
@@ -4668,7 +4668,7 @@ public:
// TODO: dtor?
- void dump_dot (graphviz_out *gv, const dump_args_t &args) const FINAL OVERRIDE
+ void dump_dot (graphviz_out *gv, const dump_args_t &args) const final override
{
gv->println ("subgraph \"cluster_supernode_%i\" {", m_supernode->m_index);
gv->indent ();
@@ -4687,7 +4687,7 @@ public:
gv->println ("}");
}
- void add_node (exploded_node *en) FINAL OVERRIDE
+ void add_node (exploded_node *en) final override
{
m_enodes.safe_push (en);
}
@@ -4725,7 +4725,7 @@ public:
delete (*iter).second;
}
- void dump_dot (graphviz_out *gv, const dump_args_t &args) const FINAL OVERRIDE
+ void dump_dot (graphviz_out *gv, const dump_args_t &args) const final override
{
const char *funcname = function_name (m_fun);
@@ -4757,7 +4757,7 @@ public:
gv->println ("}");
}
- void add_node (exploded_node *en) FINAL OVERRIDE
+ void add_node (exploded_node *en) final override
{
const supernode *supernode = en->get_supernode ();
gcc_assert (supernode);
@@ -4872,7 +4872,7 @@ public:
delete (*iter).second;
}
- void dump_dot (graphviz_out *gv, const dump_args_t &args) const FINAL OVERRIDE
+ void dump_dot (graphviz_out *gv, const dump_args_t &args) const final override
{
int i;
exploded_node *enode;
@@ -4893,7 +4893,7 @@ public:
child_cluster->dump_dot (gv, args);
}
- void add_node (exploded_node *en) FINAL OVERRIDE
+ void add_node (exploded_node *en) final override
{
function *fun = en->get_function ();
if (!fun)
@@ -4941,7 +4941,7 @@ class enode_label : public range_label
exploded_node *enode)
: m_ext_state (ext_state), m_enode (enode) {}
- label_text get_text (unsigned) const FINAL OVERRIDE
+ label_text get_text (unsigned) const final override
{
pretty_printer pp;
pp_format_decoder (&pp) = default_tree_printer;
@@ -5243,7 +5243,7 @@ public:
gcc_assert (fun);
}
- void dump_dot (graphviz_out *gv, const dump_args_t &args) const FINAL OVERRIDE
+ void dump_dot (graphviz_out *gv, const dump_args_t &args) const final override
{
pretty_printer *pp = gv->get_pp ();
@@ -5348,7 +5348,7 @@ public:
{}
void dump_dot (graphviz_out *gv, const dump_args_t &) const
- FINAL OVERRIDE
+ final override
{
pretty_printer *pp = gv->get_pp ();
@@ -5491,7 +5491,7 @@ public:
/* Show exploded nodes for BEFORE_SUPERNODE points before N. */
bool add_node_annotations (graphviz_out *gv, const supernode &n,
bool within_table)
- const FINAL OVERRIDE
+ const final override
{
if (!within_table)
return false;
@@ -5525,7 +5525,7 @@ public:
/* Show exploded nodes for STMT. */
void add_stmt_annotations (graphviz_out *gv, const gimple *stmt,
bool within_row)
- const FINAL OVERRIDE
+ const final override
{
if (!within_row)
return;
@@ -5556,7 +5556,7 @@ public:
/* Show exploded nodes for AFTER_SUPERNODE points after N. */
bool add_after_node_annotations (graphviz_out *gv, const supernode &n)
- const FINAL OVERRIDE
+ const final override
{
gv->begin_tr ();
pretty_printer *pp = gv->get_pp ();
@@ -5717,12 +5717,12 @@ public:
m_logger (logger)
{}
- void register_state_machine (state_machine *sm) FINAL OVERRIDE
+ void register_state_machine (state_machine *sm) final override
{
m_checkers->safe_push (sm);
}
- logger *get_logger () const FINAL OVERRIDE
+ logger *get_logger () const final override
{
return m_logger;
}
@@ -47,12 +47,12 @@ class impl_region_model_context : public region_model_context
uncertainty_t *uncertainty,
logger *logger = NULL);
- bool warn (pending_diagnostic *d) FINAL OVERRIDE;
- void add_note (pending_note *pn) FINAL OVERRIDE;
- void on_svalue_leak (const svalue *) OVERRIDE;
+ bool warn (pending_diagnostic *d) final override;
+ void add_note (pending_note *pn) final override;
+ void on_svalue_leak (const svalue *) override;
void on_liveness_change (const svalue_set &live_svalues,
- const region_model *model) FINAL OVERRIDE;
- logger *get_logger () FINAL OVERRIDE
+ const region_model *model) final override;
+ logger *get_logger () final override
{
return m_logger.get_logger ();
}
@@ -63,35 +63,35 @@ class impl_region_model_context : public region_model_context
void on_condition (const svalue *lhs,
enum tree_code op,
- const svalue *rhs) FINAL OVERRIDE;
+ const svalue *rhs) final override;
- void on_unknown_change (const svalue *sval, bool is_mutable) FINAL OVERRIDE;
+ void on_unknown_change (const svalue *sval, bool is_mutable) final override;
- void on_phi (const gphi *phi, tree rhs) FINAL OVERRIDE;
+ void on_phi (const gphi *phi, tree rhs) final override;
void on_unexpected_tree_code (tree t,
- const dump_location_t &loc) FINAL OVERRIDE;
+ const dump_location_t &loc) final override;
- void on_escaped_function (tree fndecl) FINAL OVERRIDE;
+ void on_escaped_function (tree fndecl) final override;
- uncertainty_t *get_uncertainty () FINAL OVERRIDE;
+ uncertainty_t *get_uncertainty () final override;
- void purge_state_involving (const svalue *sval) FINAL OVERRIDE;
+ void purge_state_involving (const svalue *sval) final override;
- void bifurcate (custom_edge_info *info) FINAL OVERRIDE;
- void terminate_path () FINAL OVERRIDE;
- const extrinsic_state *get_ext_state () const FINAL OVERRIDE
+ void bifurcate (custom_edge_info *info) final override;
+ void terminate_path () final override;
+ const extrinsic_state *get_ext_state () const final override
{
return &m_ext_state;
}
bool get_malloc_map (sm_state_map **out_smap,
const state_machine **out_sm,
- unsigned *out_sm_idx) FINAL OVERRIDE;
+ unsigned *out_sm_idx) final override;
bool get_taint_map (sm_state_map **out_smap,
const state_machine **out_sm,
- unsigned *out_sm_idx) FINAL OVERRIDE;
+ unsigned *out_sm_idx) final override;
- const gimple *get_stmt () const OVERRIDE { return m_stmt; }
+ const gimple *get_stmt () const override { return m_stmt; }
exploded_graph *m_eg;
log_user m_logger;
@@ -205,7 +205,7 @@ class exploded_node : public dnode<eg_traits>
const char * get_dot_fillcolor () const;
void dump_dot (graphviz_out *gv, const dump_args_t &args)
- const FINAL OVERRIDE;
+ const final override;
void dump_dot_id (pretty_printer *pp) const;
void dump_to_pp (pretty_printer *pp, const extrinsic_state &ext_state) const;
@@ -343,7 +343,7 @@ class exploded_edge : public dedge<eg_traits>
custom_edge_info *custom_info);
~exploded_edge ();
void dump_dot (graphviz_out *gv, const dump_args_t &args)
- const FINAL OVERRIDE;
+ const final override;
void dump_dot_label (pretty_printer *pp) const;
json::object *to_json () const;
@@ -374,7 +374,7 @@ public:
m_is_returning_call (is_returning_call)
{}
- void print (pretty_printer *pp) const FINAL OVERRIDE
+ void print (pretty_printer *pp) const final override
{
if (m_is_returning_call)
pp_string (pp, "dynamic_return");
@@ -384,10 +384,10 @@ public:
bool update_model (region_model *model,
const exploded_edge *eedge,
- region_model_context *ctxt) const FINAL OVERRIDE;
+ region_model_context *ctxt) const final override;
void add_events_to_path (checker_path *emission_path,
- const exploded_edge &eedge) const FINAL OVERRIDE;
+ const exploded_edge &eedge) const final override;
private:
const gcall *m_dynamic_call;
const bool m_is_returning_call;
@@ -406,17 +406,17 @@ public:
m_longjmp_call (longjmp_call)
{}
- void print (pretty_printer *pp) const FINAL OVERRIDE
+ void print (pretty_printer *pp) const final override
{
pp_string (pp, "rewind");
}
bool update_model (region_model *model,
const exploded_edge *eedge,
- region_model_context *ctxt) const FINAL OVERRIDE;
+ region_model_context *ctxt) const final override;
void add_events_to_path (checker_path *emission_path,
- const exploded_edge &eedge) const FINAL OVERRIDE;
+ const exploded_edge &eedge) const final override;
const program_point &get_setjmp_point () const
{
@@ -91,7 +91,7 @@ public:
}
void dump_dot (graphviz_out *gv,
- const dump_args_t &args) const FINAL OVERRIDE;
+ const dump_args_t &args) const final override;
const feasibility_state &get_state () const { return m_state; }
const region_model &get_model () const { return m_state.get_model (); }
@@ -123,7 +123,7 @@ public:
~infeasible_node () { delete m_rc; }
void dump_dot (graphviz_out *gv,
- const dump_args_t &args) const FINAL OVERRIDE;
+ const dump_args_t &args) const final override;
private:
rejected_constraint *m_rc;
@@ -135,7 +135,7 @@ class base_feasible_edge : public dedge<fg_traits>
{
public:
void dump_dot (graphviz_out *gv,
- const dump_args_t &args) const FINAL OVERRIDE;
+ const dump_args_t &args) const final override;
const exploded_edge *get_inner_edge () const { return m_inner_edge; }
@@ -331,7 +331,7 @@ class pending_diagnostic_subclass : public pending_diagnostic
{
public:
bool subclass_equal_p (const pending_diagnostic &base_other) const
- FINAL OVERRIDE
+ final override
{
const Subclass &other = (const Subclass &)base_other;
return *(const Subclass*)this == other;
@@ -374,7 +374,7 @@ class pending_note_subclass : public pending_note
{
public:
bool subclass_equal_p (const pending_note &base_other) const
- FINAL OVERRIDE
+ final override
{
const Subclass &other = (const Subclass &)base_other;
return *(const Subclass*)this == other;
@@ -621,7 +621,7 @@ region_model::impl_call_realloc (const call_details &cd)
bool update_model (region_model *model,
const exploded_edge *,
- region_model_context *ctxt) const FINAL OVERRIDE
+ region_model_context *ctxt) const final override
{
/* Return NULL; everything else is unchanged. */
const call_details cd (get_call_details (model, ctxt));
@@ -647,7 +647,7 @@ region_model::impl_call_realloc (const call_details &cd)
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE
+ label_text get_desc (bool can_colorize) const final override
{
return make_label_text (can_colorize,
"when %qE succeeds, without moving buffer",
@@ -656,7 +656,7 @@ region_model::impl_call_realloc (const call_details &cd)
bool update_model (region_model *model,
const exploded_edge *,
- region_model_context *ctxt) const FINAL OVERRIDE
+ region_model_context *ctxt) const final override
{
/* Update size of buffer and return the ptr unchanged. */
const call_details cd (get_call_details (model, ctxt));
@@ -699,7 +699,7 @@ region_model::impl_call_realloc (const call_details &cd)
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE
+ label_text get_desc (bool can_colorize) const final override
{
return make_label_text (can_colorize,
"when %qE succeeds, moving buffer",
@@ -707,7 +707,7 @@ region_model::impl_call_realloc (const call_details &cd)
}
bool update_model (region_model *model,
const exploded_edge *,
- region_model_context *ctxt) const FINAL OVERRIDE
+ region_model_context *ctxt) const final override
{
const call_details cd (get_call_details (model, ctxt));
const svalue *old_ptr_sval = cd.get_arg_svalue (0);
@@ -800,7 +800,7 @@ region_model::impl_call_strchr (const call_details &cd)
{
}
- label_text get_desc (bool can_colorize) const FINAL OVERRIDE
+ label_text get_desc (bool can_colorize) const final override
{
if (m_found)
return make_label_text (can_colorize,
@@ -814,7 +814,7 @@ region_model::impl_call_strchr (const call_details &cd)
bool update_model (region_model *model,
const exploded_edge *,
- region_model_context *ctxt) const FINAL OVERRIDE
+ region_model_context *ctxt) const final override
{
const call_details cd (get_call_details (model, ctxt));
if (tree lhs_type = cd.get_lhs_type ())
@@ -465,9 +465,9 @@ public:
m_src_region (src_region)
{}
- const char *get_kind () const FINAL OVERRIDE { return "poisoned_value_diagnostic"; }
+ const char *get_kind () const final override { return "poisoned_value_diagnostic"; }
- bool use_of_uninit_p () const FINAL OVERRIDE
+ bool use_of_uninit_p () const final override
{
return m_pkind == POISON_KIND_UNINIT;
}
@@ -479,7 +479,7 @@ public:
&& m_src_region == other.m_src_region);
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
switch (m_pkind)
{
@@ -494,7 +494,7 @@ public:
}
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
switch (m_pkind)
{
@@ -530,7 +530,7 @@ public:
}
}
- label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
+ label_text describe_final_event (const evdesc::final_event &ev) final override
{
switch (m_pkind)
{
@@ -549,7 +549,7 @@ public:
}
}
- void mark_interesting_stuff (interesting_t *interest) FINAL OVERRIDE
+ void mark_interesting_stuff (interesting_t *interest) final override
{
if (m_src_region)
interest->add_region_creation (m_src_region);
@@ -572,7 +572,7 @@ public:
: m_assign (assign), m_count_cst (count_cst)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "shift_count_negative_diagnostic";
}
@@ -583,18 +583,18 @@ public:
&& same_tree_p (m_count_cst, other.m_count_cst));
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_shift_count_negative;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
return warning_at (rich_loc, get_controlling_option (),
"shift by negative count (%qE)", m_count_cst);
}
- 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 ("shift by negative amount here (%qE)", m_count_cst);
}
@@ -618,7 +618,7 @@ public:
m_count_cst (count_cst)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "shift_count_overflow_diagnostic";
}
@@ -630,19 +630,19 @@ public:
&& same_tree_p (m_count_cst, other.m_count_cst));
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_shift_count_overflow;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
return warning_at (rich_loc, get_controlling_option (),
"shift by count (%qE) >= precision of type (%qi)",
m_count_cst, m_operand_precision);
}
- 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 ("shift by count %qE here", m_count_cst);
}
@@ -1117,18 +1117,18 @@ class dump_path_diagnostic
: public pending_diagnostic_subclass<dump_path_diagnostic>
{
public:
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return 0;
}
- bool emit (rich_location *richloc) FINAL OVERRIDE
+ bool emit (rich_location *richloc) final override
{
inform (richloc, "path");
return true;
}
- const char *get_kind () const FINAL OVERRIDE { return "dump_path_diagnostic"; }
+ const char *get_kind () const final override { return "dump_path_diagnostic"; }
bool operator== (const dump_path_diagnostic &) const
{
@@ -1638,7 +1638,7 @@ public:
{
}
- const char *get_kind () const FINAL OVERRIDE { return "reason_attr_access"; }
+ const char *get_kind () const final override { return "reason_attr_access"; }
void emit () const
{
@@ -1719,7 +1719,7 @@ check_external_function_for_access_attr (const gcall *call,
m_access (access)
{
}
- pending_note *make_note () FINAL OVERRIDE
+ pending_note *make_note () final override
{
return new reason_attr_access (m_callee_fndecl, m_access);
}
@@ -2566,7 +2566,7 @@ public:
: m_reg (reg), m_decl (decl)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "write_to_const_diagnostic";
}
@@ -2577,12 +2577,12 @@ public:
&& m_decl == other.m_decl);
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_write_to_const;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
auto_diagnostic_group d;
bool warned;
@@ -2606,7 +2606,7 @@ public:
return warned;
}
- label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
+ label_text describe_final_event (const evdesc::final_event &ev) final override
{
switch (m_reg->get_kind ())
{
@@ -2635,7 +2635,7 @@ public:
: m_reg (reg)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "write_to_string_literal_diagnostic";
}
@@ -2645,12 +2645,12 @@ public:
return m_reg == other.m_reg;
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_write_to_string_literal;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
return warning_at (rich_loc, get_controlling_option (),
"write to string literal");
@@ -2658,7 +2658,7 @@ public:
but it is not available at this point. */
}
- 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 ("write to string literal here");
}
@@ -970,52 +970,52 @@ class region_model_context
class noop_region_model_context : public region_model_context
{
public:
- bool warn (pending_diagnostic *) OVERRIDE { return false; }
- void add_note (pending_note *pn) OVERRIDE;
- void on_svalue_leak (const svalue *) OVERRIDE {}
+ bool warn (pending_diagnostic *) override { return false; }
+ void add_note (pending_note *pn) override;
+ void on_svalue_leak (const svalue *) override {}
void on_liveness_change (const svalue_set &,
- const region_model *) OVERRIDE {}
- logger *get_logger () OVERRIDE { return NULL; }
+ const region_model *) override {}
+ logger *get_logger () override { return NULL; }
void on_condition (const svalue *lhs ATTRIBUTE_UNUSED,
enum tree_code op ATTRIBUTE_UNUSED,
- const svalue *rhs ATTRIBUTE_UNUSED) OVERRIDE
+ const svalue *rhs ATTRIBUTE_UNUSED) override
{
}
void on_unknown_change (const svalue *sval ATTRIBUTE_UNUSED,
- bool is_mutable ATTRIBUTE_UNUSED) OVERRIDE
+ bool is_mutable ATTRIBUTE_UNUSED) override
{
}
void on_phi (const gphi *phi ATTRIBUTE_UNUSED,
- tree rhs ATTRIBUTE_UNUSED) OVERRIDE
+ tree rhs ATTRIBUTE_UNUSED) override
{
}
- void on_unexpected_tree_code (tree, const dump_location_t &) OVERRIDE {}
+ void on_unexpected_tree_code (tree, const dump_location_t &) override {}
- void on_escaped_function (tree) OVERRIDE {}
+ void on_escaped_function (tree) override {}
- uncertainty_t *get_uncertainty () OVERRIDE { return NULL; }
+ uncertainty_t *get_uncertainty () override { return NULL; }
- void purge_state_involving (const svalue *sval ATTRIBUTE_UNUSED) OVERRIDE {}
+ void purge_state_involving (const svalue *sval ATTRIBUTE_UNUSED) override {}
- void bifurcate (custom_edge_info *info) OVERRIDE;
- void terminate_path () OVERRIDE;
+ void bifurcate (custom_edge_info *info) override;
+ void terminate_path () override;
- const extrinsic_state *get_ext_state () const OVERRIDE { return NULL; }
+ const extrinsic_state *get_ext_state () const override { return NULL; }
bool get_malloc_map (sm_state_map **,
const state_machine **,
- unsigned *) OVERRIDE
+ unsigned *) override
{
return false;
}
bool get_taint_map (sm_state_map **,
const state_machine **,
- unsigned *) OVERRIDE
+ unsigned *) override
{
return false;
}
- const gimple *get_stmt () const OVERRIDE { return NULL; }
+ const gimple *get_stmt () const override { return NULL; }
};
/* A subclass of region_model_context for determining if operations fail
@@ -1027,7 +1027,7 @@ public:
tentative_region_model_context () : m_num_unexpected_codes (0) {}
void on_unexpected_tree_code (tree, const dump_location_t &)
- FINAL OVERRIDE
+ final override
{
m_num_unexpected_codes++;
}
@@ -1044,100 +1044,100 @@ private:
class region_model_context_decorator : public region_model_context
{
public:
- bool warn (pending_diagnostic *d) OVERRIDE
+ bool warn (pending_diagnostic *d) override
{
return m_inner->warn (d);
}
- void add_note (pending_note *pn) OVERRIDE
+ void add_note (pending_note *pn) override
{
m_inner->add_note (pn);
}
- void on_svalue_leak (const svalue *sval) OVERRIDE
+ void on_svalue_leak (const svalue *sval) override
{
m_inner->on_svalue_leak (sval);
}
void on_liveness_change (const svalue_set &live_svalues,
- const region_model *model) OVERRIDE
+ const region_model *model) override
{
m_inner->on_liveness_change (live_svalues, model);
}
- logger *get_logger () OVERRIDE
+ logger *get_logger () override
{
return m_inner->get_logger ();
}
void on_condition (const svalue *lhs,
enum tree_code op,
- const svalue *rhs) OVERRIDE
+ const svalue *rhs) override
{
m_inner->on_condition (lhs, op, rhs);
}
- void on_unknown_change (const svalue *sval, bool is_mutable) OVERRIDE
+ void on_unknown_change (const svalue *sval, bool is_mutable) override
{
m_inner->on_unknown_change (sval, is_mutable);
}
- void on_phi (const gphi *phi, tree rhs) OVERRIDE
+ void on_phi (const gphi *phi, tree rhs) override
{
m_inner->on_phi (phi, rhs);
}
void on_unexpected_tree_code (tree t,
- const dump_location_t &loc) OVERRIDE
+ const dump_location_t &loc) override
{
m_inner->on_unexpected_tree_code (t, loc);
}
- void on_escaped_function (tree fndecl) OVERRIDE
+ void on_escaped_function (tree fndecl) override
{
m_inner->on_escaped_function (fndecl);
}
- uncertainty_t *get_uncertainty () OVERRIDE
+ uncertainty_t *get_uncertainty () override
{
return m_inner->get_uncertainty ();
}
- void purge_state_involving (const svalue *sval) OVERRIDE
+ void purge_state_involving (const svalue *sval) override
{
m_inner->purge_state_involving (sval);
}
- void bifurcate (custom_edge_info *info) OVERRIDE
+ void bifurcate (custom_edge_info *info) override
{
m_inner->bifurcate (info);
}
- void terminate_path () OVERRIDE
+ void terminate_path () override
{
m_inner->terminate_path ();
}
- const extrinsic_state *get_ext_state () const OVERRIDE
+ const extrinsic_state *get_ext_state () const override
{
return m_inner->get_ext_state ();
}
bool get_malloc_map (sm_state_map **out_smap,
const state_machine **out_sm,
- unsigned *out_sm_idx) OVERRIDE
+ unsigned *out_sm_idx) override
{
return m_inner->get_malloc_map (out_smap, out_sm, out_sm_idx);
}
bool get_taint_map (sm_state_map **out_smap,
const state_machine **out_sm,
- unsigned *out_sm_idx) OVERRIDE
+ unsigned *out_sm_idx) override
{
return m_inner->get_taint_map (out_smap, out_sm, out_sm_idx);
}
- const gimple *get_stmt () const OVERRIDE
+ const gimple *get_stmt () const override
{
return m_inner->get_stmt ();
}
@@ -1158,7 +1158,7 @@ protected:
class note_adding_context : public region_model_context_decorator
{
public:
- bool warn (pending_diagnostic *d) OVERRIDE
+ bool warn (pending_diagnostic *d) override
{
if (m_inner->warn (d))
{
@@ -1248,7 +1248,7 @@ public:
m_lhs (lhs), m_op (op), m_rhs (rhs)
{}
- void dump_to_pp (pretty_printer *pp) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp) const final override;
tree m_lhs;
enum tree_code m_op;
@@ -1264,7 +1264,7 @@ public:
m_expr (expr), m_ranges (ranges)
{}
- void dump_to_pp (pretty_printer *pp) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp) const final override;
private:
tree m_expr;
@@ -1305,7 +1305,7 @@ using namespace ::selftest;
class test_region_model_context : public noop_region_model_context
{
public:
- bool warn (pending_diagnostic *d) FINAL OVERRIDE
+ bool warn (pending_diagnostic *d) final override
{
m_diagnostics.safe_push (d);
return true;
@@ -1314,7 +1314,7 @@ public:
unsigned get_num_diagnostics () const { return m_diagnostics.length (); }
void on_unexpected_tree_code (tree t, const dump_location_t &)
- FINAL OVERRIDE
+ final override
{
internal_error ("unhandled tree code: %qs",
get_tree_code_name (TREE_CODE (t)));
@@ -306,13 +306,13 @@ public:
~frame_region ();
/* region vfuncs. */
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_FRAME; }
- const frame_region * dyn_cast_frame_region () const FINAL OVERRIDE
+ enum region_kind get_kind () const final override { return RK_FRAME; }
+ const frame_region * dyn_cast_frame_region () const final override
{
return this;
}
- void accept (visitor *v) const FINAL OVERRIDE;
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void accept (visitor *v) const final override;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
/* Accessors. */
const frame_region *get_calling_frame () const { return m_calling_frame; }
@@ -371,8 +371,8 @@ class globals_region : public space_region
{}
/* region vfuncs. */
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_GLOBALS; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ enum region_kind get_kind () const final override { return RK_GLOBALS; }
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
};
} // namespace ana
@@ -398,8 +398,8 @@ public:
{}
/* region vfuncs. */
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_CODE; }
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ enum region_kind get_kind () const final override { return RK_CODE; }
const region *get_element (region_model *model,
const svalue *index,
@@ -432,10 +432,10 @@ public:
}
/* region vfuncs. */
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_FUNCTION; }
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ enum region_kind get_kind () const final override { return RK_FUNCTION; }
const function_region *
- dyn_cast_function_region () const FINAL OVERRIDE{ return this; }
+ dyn_cast_function_region () const final override{ return this; }
tree get_fndecl () const { return m_fndecl; }
@@ -472,8 +472,8 @@ public:
}
/* region vfuncs. */
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_LABEL; }
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ enum region_kind get_kind () const final override { return RK_LABEL; }
tree get_label () const { return m_label; }
@@ -503,9 +503,9 @@ public:
: space_region (id, parent)
{}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_STACK; }
+ enum region_kind get_kind () const final override { return RK_STACK; }
};
} // namespace ana
@@ -530,8 +530,8 @@ public:
: space_region (id, parent)
{}
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_HEAP; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ enum region_kind get_kind () const final override { return RK_HEAP; }
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
};
} // namespace ana
@@ -555,8 +555,8 @@ class root_region : public region
public:
root_region (unsigned id);
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_ROOT; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ enum region_kind get_kind () const final override { return RK_ROOT; }
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
};
} // namespace ana
@@ -614,11 +614,11 @@ public:
symbolic_region (unsigned id, region *parent, const svalue *sval_ptr);
const symbolic_region *
- dyn_cast_symbolic_region () const FINAL OVERRIDE { return this; }
+ dyn_cast_symbolic_region () const final override { return this; }
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_SYMBOLIC; }
- void accept (visitor *v) const FINAL OVERRIDE;
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ enum region_kind get_kind () const final override { return RK_SYMBOLIC; }
+ void accept (visitor *v) const final override;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
const svalue *get_pointer () const { return m_sval_ptr; }
@@ -656,13 +656,13 @@ public:
m_tracked (calc_tracked_p (decl))
{}
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_DECL; }
+ enum region_kind get_kind () const final override { return RK_DECL; }
const decl_region *
- dyn_cast_decl_region () const FINAL OVERRIDE { return this; }
+ dyn_cast_decl_region () const final override { return this; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
- bool tracked_p () const FINAL OVERRIDE { return m_tracked; }
+ bool tracked_p () const final override { return m_tracked; }
tree get_decl () const { return m_decl; }
int get_stack_depth () const;
@@ -738,15 +738,15 @@ public:
m_field (field)
{}
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_FIELD; }
+ enum region_kind get_kind () const final override { return RK_FIELD; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
const field_region *
- dyn_cast_field_region () const FINAL OVERRIDE { return this; }
+ dyn_cast_field_region () const final override { return this; }
tree get_field () const { return m_field; }
- bool get_relative_concrete_offset (bit_offset_t *out) const FINAL OVERRIDE;
+ bool get_relative_concrete_offset (bit_offset_t *out) const final override;
private:
tree m_field;
@@ -819,18 +819,18 @@ public:
m_index (index)
{}
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_ELEMENT; }
+ enum region_kind get_kind () const final override { return RK_ELEMENT; }
const element_region *
- dyn_cast_element_region () const FINAL OVERRIDE { return this; }
+ dyn_cast_element_region () const final override { return this; }
- void accept (visitor *v) const FINAL OVERRIDE;
+ void accept (visitor *v) const final override;
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
const svalue *get_index () const { return m_index; }
virtual bool
- get_relative_concrete_offset (bit_offset_t *out) const FINAL OVERRIDE;
+ get_relative_concrete_offset (bit_offset_t *out) const final override;
private:
const svalue *m_index;
@@ -904,17 +904,17 @@ public:
m_byte_offset (byte_offset)
{}
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_OFFSET; }
+ enum region_kind get_kind () const final override { return RK_OFFSET; }
const offset_region *
- dyn_cast_offset_region () const FINAL OVERRIDE { return this; }
+ dyn_cast_offset_region () const final override { return this; }
- void accept (visitor *v) const FINAL OVERRIDE;
+ void accept (visitor *v) const final override;
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
const svalue *get_byte_offset () const { return m_byte_offset; }
- bool get_relative_concrete_offset (bit_offset_t *out) const FINAL OVERRIDE;
+ bool get_relative_concrete_offset (bit_offset_t *out) const final override;
private:
const svalue *m_byte_offset;
@@ -992,19 +992,19 @@ public:
m_byte_size_sval (byte_size_sval)
{}
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_SIZED; }
+ enum region_kind get_kind () const final override { return RK_SIZED; }
const sized_region *
- dyn_cast_sized_region () const FINAL OVERRIDE { return this; }
+ dyn_cast_sized_region () const final override { return this; }
- void accept (visitor *v) const FINAL OVERRIDE;
+ void accept (visitor *v) const final override;
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
- bool get_byte_size (byte_size_t *out) const FINAL OVERRIDE;
- bool get_bit_size (bit_size_t *out) const FINAL OVERRIDE;
+ bool get_byte_size (byte_size_t *out) const final override;
+ bool get_bit_size (bit_size_t *out) const final override;
const svalue *
- get_byte_size_sval (region_model_manager *) const FINAL OVERRIDE
+ get_byte_size_sval (region_model_manager *) const final override
{
return m_byte_size_sval;
}
@@ -1074,11 +1074,11 @@ public:
m_original_region (original_region)
{}
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_CAST; }
+ enum region_kind get_kind () const final override { return RK_CAST; }
const cast_region *
- dyn_cast_cast_region () const FINAL OVERRIDE { return this; }
- void accept (visitor *v) const FINAL OVERRIDE;
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ dyn_cast_cast_region () const final override { return this; }
+ void accept (visitor *v) const final override;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
const region *get_original_region () const { return m_original_region; }
@@ -1115,9 +1115,9 @@ public:
{}
enum region_kind
- get_kind () const FINAL OVERRIDE { return RK_HEAP_ALLOCATED; }
+ get_kind () const final override { return RK_HEAP_ALLOCATED; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
};
/* An untyped region dynamically allocated on the stack via "alloca". */
@@ -1129,9 +1129,9 @@ public:
: region (complexity (parent), id, parent, NULL_TREE)
{}
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_ALLOCA; }
+ enum region_kind get_kind () const final override { return RK_ALLOCA; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
};
/* A region for a STRING_CST. */
@@ -1145,11 +1145,11 @@ public:
{}
const string_region *
- dyn_cast_string_region () const FINAL OVERRIDE { return this; }
+ dyn_cast_string_region () const final override { return this; }
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_STRING; }
+ enum region_kind get_kind () const final override { return RK_STRING; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
tree get_string_cst () const { return m_string_cst; }
@@ -1220,18 +1220,18 @@ public:
{}
const bit_range_region *
- dyn_cast_bit_range_region () const FINAL OVERRIDE { return this; }
+ dyn_cast_bit_range_region () const final override { return this; }
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_BIT_RANGE; }
+ enum region_kind get_kind () const final override { return RK_BIT_RANGE; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
const bit_range &get_bits () const { return m_bits; }
- bool get_byte_size (byte_size_t *out) const FINAL OVERRIDE;
- bool get_bit_size (bit_size_t *out) const FINAL OVERRIDE;
- const svalue *get_byte_size_sval (region_model_manager *mgr) const FINAL OVERRIDE;
- bool get_relative_concrete_offset (bit_offset_t *out) const FINAL OVERRIDE;
+ bool get_byte_size (byte_size_t *out) const final override;
+ bool get_bit_size (bit_size_t *out) const final override;
+ const svalue *get_byte_size_sval (region_model_manager *mgr) const final override;
+ bool get_relative_concrete_offset (bit_offset_t *out) const final override;
private:
bit_range m_bits;
@@ -1305,11 +1305,11 @@ public:
{}
const var_arg_region *
- dyn_cast_var_arg_region () const FINAL OVERRIDE { return this; }
+ dyn_cast_var_arg_region () const final override { return this; }
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_VAR_ARG; }
+ enum region_kind get_kind () const final override { return RK_VAR_ARG; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
const frame_region *get_frame_region () const;
unsigned get_index () const { return m_idx; }
@@ -1345,9 +1345,9 @@ public:
: region (complexity (parent), id, parent, type)
{}
- enum region_kind get_kind () const FINAL OVERRIDE { return RK_UNKNOWN; }
+ enum region_kind get_kind () const final override { return RK_UNKNOWN; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
};
} // namespace ana
@@ -57,10 +57,10 @@ class fileptr_state_machine : public state_machine
public:
fileptr_state_machine (logger *logger);
- bool inherited_state_p () const FINAL OVERRIDE { return false; }
+ bool inherited_state_p () const final override { return false; }
state_machine::state_t
- get_default_state (const svalue *sval) const FINAL OVERRIDE
+ get_default_state (const svalue *sval) const final override
{
if (tree cst = sval->maybe_get_constant ())
{
@@ -72,17 +72,17 @@ public:
bool on_stmt (sm_context *sm_ctxt,
const supernode *node,
- const gimple *stmt) const FINAL OVERRIDE;
+ const gimple *stmt) const final override;
void on_condition (sm_context *sm_ctxt,
const supernode *node,
const gimple *stmt,
const svalue *lhs,
enum tree_code op,
- const svalue *rhs) const FINAL OVERRIDE;
+ const svalue *rhs) const final override;
- bool can_purge_p (state_t s) const FINAL OVERRIDE;
- pending_diagnostic *on_leak (tree var) const FINAL OVERRIDE;
+ bool can_purge_p (state_t s) const final override;
+ pending_diagnostic *on_leak (tree var) const final override;
/* State for a FILE * returned from fopen that hasn't been checked for
NULL.
@@ -111,13 +111,13 @@ public:
: m_sm (sm), m_arg (arg)
{}
- 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_arg, ((const file_diagnostic &)base_other).m_arg);
}
label_text describe_state_change (const evdesc::state_change &change)
- OVERRIDE
+ override
{
if (change.m_old_state == m_sm.get_start_state ()
&& change.m_new_state == m_sm.m_unchecked)
@@ -155,14 +155,14 @@ public:
: file_diagnostic (sm, arg)
{}
- const char *get_kind () const FINAL OVERRIDE { return "double_fclose"; }
+ const char *get_kind () const final override { return "double_fclose"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_double_fclose;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
return warning_at (rich_loc, get_controlling_option (),
"double %<fclose%> of FILE %qE",
@@ -170,7 +170,7 @@ public:
}
label_text describe_state_change (const evdesc::state_change &change)
- OVERRIDE
+ override
{
if (change.m_new_state == m_sm.m_closed)
{
@@ -180,7 +180,7 @@ public:
return file_diagnostic::describe_state_change (change);
}
- 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_first_fclose_event.known_p ())
return ev.formatted_print ("second %qs here; first %qs was at %@",
@@ -200,14 +200,14 @@ public:
: file_diagnostic (sm, arg)
{}
- const char *get_kind () const FINAL OVERRIDE { return "file_leak"; }
+ const char *get_kind () const final override { return "file_leak"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_file_leak;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
diagnostic_metadata m;
/* CWE-775: "Missing Release of File Descriptor or Handle after
@@ -223,7 +223,7 @@ public:
}
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (change.m_new_state == m_sm.m_unchecked)
{
@@ -233,7 +233,7 @@ public:
return file_diagnostic::describe_state_change (change);
}
- 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_fopen_event.known_p ())
{
@@ -128,7 +128,7 @@ struct allocation_state : public state_machine::state
m_deallocator (deallocator)
{}
- void dump_to_pp (pretty_printer *pp) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp) const final override;
const allocation_state *get_nonnull () const;
@@ -243,9 +243,9 @@ struct custom_deallocator_set : public deallocator_set
//unsigned arg_idx,
enum wording wording);
- bool contains_p (const deallocator *d) const FINAL OVERRIDE;
- const deallocator *maybe_get_single () const FINAL OVERRIDE;
- void dump_to_pp (pretty_printer *pp) const FINAL OVERRIDE;
+ bool contains_p (const deallocator *d) const final override;
+ const deallocator *maybe_get_single () const final override;
+ void dump_to_pp (pretty_printer *pp) const final override;
auto_vec <const deallocator *> m_deallocator_vec;
};
@@ -259,9 +259,9 @@ struct standard_deallocator_set : public deallocator_set
const char *name,
enum wording wording);
- bool contains_p (const deallocator *d) const FINAL OVERRIDE;
- const deallocator *maybe_get_single () const FINAL OVERRIDE;
- void dump_to_pp (pretty_printer *pp) const FINAL OVERRIDE;
+ bool contains_p (const deallocator *d) const final override;
+ const deallocator *maybe_get_single () const final override;
+ void dump_to_pp (pretty_printer *pp) const final override;
standard_deallocator m_deallocator;
};
@@ -343,10 +343,10 @@ public:
const deallocator_set *deallocators,
const deallocator *deallocator);
- bool inherited_state_p () const FINAL OVERRIDE { return false; }
+ bool inherited_state_p () const final override { return false; }
state_machine::state_t
- get_default_state (const svalue *sval) const FINAL OVERRIDE
+ get_default_state (const svalue *sval) const final override
{
if (tree cst = sval->maybe_get_constant ())
{
@@ -372,25 +372,25 @@ public:
bool on_stmt (sm_context *sm_ctxt,
const supernode *node,
- const gimple *stmt) const FINAL OVERRIDE;
+ const gimple *stmt) const final override;
void on_phi (sm_context *sm_ctxt,
const supernode *node,
const gphi *phi,
- tree rhs) const FINAL OVERRIDE;
+ tree rhs) const final override;
void on_condition (sm_context *sm_ctxt,
const supernode *node,
const gimple *stmt,
const svalue *lhs,
enum tree_code op,
- const svalue *rhs) const FINAL OVERRIDE;
+ const svalue *rhs) const final override;
- bool can_purge_p (state_t s) const FINAL OVERRIDE;
- pending_diagnostic *on_leak (tree var) const FINAL OVERRIDE;
+ bool can_purge_p (state_t s) const final override;
+ pending_diagnostic *on_leak (tree var) const final override;
bool reset_when_passed_to_unknown_fn_p (state_t s,
- bool is_mutable) const FINAL OVERRIDE;
+ bool is_mutable) const final override;
static bool unaffected_by_call_p (tree fndecl);
@@ -689,13 +689,13 @@ public:
: m_sm (sm), m_arg (arg)
{}
- 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_arg, ((const malloc_diagnostic &)base_other).m_arg);
}
label_text describe_state_change (const evdesc::state_change &change)
- OVERRIDE
+ override
{
if (change.m_old_state == m_sm.get_start_state ()
&& unchecked_p (change.m_new_state))
@@ -755,17 +755,17 @@ public:
m_actual_dealloc (actual_dealloc)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "mismatching_deallocation";
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_mismatching_deallocation;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
auto_diagnostic_group d;
diagnostic_metadata m;
@@ -785,7 +785,7 @@ public:
}
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (unchecked_p (change.m_new_state))
{
@@ -801,7 +801,7 @@ public:
return malloc_diagnostic::describe_state_change (change);
}
- 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_alloc_event.known_p ())
{
@@ -837,14 +837,14 @@ public:
: malloc_diagnostic (sm, arg), m_funcname (funcname)
{}
- const char *get_kind () const FINAL OVERRIDE { return "double_free"; }
+ const char *get_kind () const final override { return "double_free"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_double_free;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
auto_diagnostic_group d;
diagnostic_metadata m;
@@ -854,7 +854,7 @@ public:
}
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (freed_p (change.m_new_state))
{
@@ -865,7 +865,7 @@ public:
}
label_text describe_call_with_state (const evdesc::call_with_state &info)
- FINAL OVERRIDE
+ final override
{
if (freed_p (info.m_state))
return info.formatted_print
@@ -874,7 +874,7 @@ public:
return label_text ();
}
- 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_first_free_event.known_p ())
return ev.formatted_print ("second %qs here; first %qs was at %@",
@@ -899,7 +899,7 @@ public:
{}
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (change.m_old_state == m_sm.get_start_state ()
&& unchecked_p (change.m_new_state))
@@ -911,7 +911,7 @@ public:
}
label_text describe_return_of_state (const evdesc::return_of_state &info)
- FINAL OVERRIDE
+ final override
{
if (unchecked_p (info.m_state))
return info.formatted_print ("possible return of NULL to %qE from %qE",
@@ -933,14 +933,14 @@ public:
: possible_null (sm, arg)
{}
- const char *get_kind () const FINAL OVERRIDE { return "possible_null_deref"; }
+ const char *get_kind () const final override { return "possible_null_deref"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_possible_null_dereference;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
/* CWE-690: Unchecked Return Value to NULL Pointer Dereference. */
diagnostic_metadata m;
@@ -949,7 +949,7 @@ public:
"dereference of possibly-NULL %qE", m_arg);
}
- 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_origin_of_unchecked_event.known_p ())
return ev.formatted_print ("%qE could be NULL: unchecked value from %@",
@@ -1013,7 +1013,7 @@ public:
m_fndecl (fndecl), m_arg_idx (arg_idx)
{}
- const char *get_kind () const FINAL OVERRIDE { return "possible_null_arg"; }
+ const char *get_kind () const final override { return "possible_null_arg"; }
bool subclass_equal_p (const pending_diagnostic &base_other) const
{
@@ -1024,12 +1024,12 @@ public:
&& m_arg_idx == sub_other.m_arg_idx);
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_possible_null_argument;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
/* CWE-690: Unchecked Return Value to NULL Pointer Dereference. */
auto_diagnostic_group d;
@@ -1044,7 +1044,7 @@ public:
return warned;
}
- label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
+ label_text describe_final_event (const evdesc::final_event &ev) final override
{
label_text arg_desc = describe_argument_index (m_fndecl, m_arg_idx);
label_text result;
@@ -1074,14 +1074,14 @@ public:
null_deref (const malloc_state_machine &sm, tree arg)
: malloc_diagnostic (sm, arg) {}
- const char *get_kind () const FINAL OVERRIDE { return "null_deref"; }
+ const char *get_kind () const final override { return "null_deref"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_null_dereference;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
/* CWE-476: NULL Pointer Dereference. */
diagnostic_metadata m;
@@ -1091,7 +1091,7 @@ public:
}
label_text describe_return_of_state (const evdesc::return_of_state &info)
- FINAL OVERRIDE
+ final override
{
if (info.m_state == m_sm.m_null)
return info.formatted_print ("return of NULL to %qE from %qE",
@@ -1099,7 +1099,7 @@ public:
return label_text ();
}
- 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 ("dereference of NULL %qE", ev.m_expr);
}
@@ -1117,7 +1117,7 @@ public:
m_fndecl (fndecl), m_arg_idx (arg_idx)
{}
- const char *get_kind () const FINAL OVERRIDE { return "null_arg"; }
+ const char *get_kind () const final override { return "null_arg"; }
bool subclass_equal_p (const pending_diagnostic &base_other) const
{
@@ -1128,12 +1128,12 @@ public:
&& m_arg_idx == sub_other.m_arg_idx);
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_null_argument;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
/* CWE-476: NULL Pointer Dereference. */
auto_diagnostic_group d;
@@ -1153,7 +1153,7 @@ public:
return warned;
}
- label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
+ label_text describe_final_event (const evdesc::final_event &ev) final override
{
label_text arg_desc = describe_argument_index (m_fndecl, m_arg_idx);
label_text result;
@@ -1184,14 +1184,14 @@ public:
gcc_assert (deallocator);
}
- const char *get_kind () const FINAL OVERRIDE { return "use_after_free"; }
+ const char *get_kind () const final override { return "use_after_free"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_use_after_free;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
/* CWE-416: Use After Free. */
diagnostic_metadata m;
@@ -1202,7 +1202,7 @@ public:
}
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (freed_p (change.m_new_state))
{
@@ -1223,7 +1223,7 @@ public:
return malloc_diagnostic::describe_state_change (change);
}
- label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
+ label_text describe_final_event (const evdesc::final_event &ev) final override
{
const char *funcname = m_deallocator->m_name;
if (m_free_event.known_p ())
@@ -1259,7 +1259,7 @@ public:
that if they are accessed after the free, it looks like
they are uninitialized). */
- bool supercedes_p (const pending_diagnostic &other) const FINAL OVERRIDE
+ bool supercedes_p (const pending_diagnostic &other) const final override
{
if (other.use_of_uninit_p ())
return true;
@@ -1278,14 +1278,14 @@ public:
malloc_leak (const malloc_state_machine &sm, tree arg)
: malloc_diagnostic (sm, arg) {}
- const char *get_kind () const FINAL OVERRIDE { return "malloc_leak"; }
+ const char *get_kind () const final override { return "malloc_leak"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_malloc_leak;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
diagnostic_metadata m;
m.add_cwe (401);
@@ -1298,7 +1298,7 @@ public:
}
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (unchecked_p (change.m_new_state)
|| (start_p (change.m_old_state) && nonnull_p (change.m_new_state)))
@@ -1309,7 +1309,7 @@ public:
return malloc_diagnostic::describe_state_change (change);
}
- 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 (ev.m_expr)
{
@@ -1343,22 +1343,22 @@ public:
{
}
- const char *get_kind () const FINAL OVERRIDE { return "free_of_non_heap"; }
+ const char *get_kind () const final override { return "free_of_non_heap"; }
bool subclass_equal_p (const pending_diagnostic &base_other) const
- FINAL OVERRIDE
+ final override
{
const free_of_non_heap &other = (const free_of_non_heap &)base_other;
return (same_tree_p (m_arg, other.m_arg)
&& m_freed_reg == other.m_freed_reg);
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_free_of_non_heap;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
auto_diagnostic_group d;
diagnostic_metadata m;
@@ -1387,17 +1387,17 @@ public:
}
label_text describe_state_change (const evdesc::state_change &)
- FINAL OVERRIDE
+ final override
{
return label_text::borrow ("pointer is from here");
}
- 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 ("call to %qs here", m_funcname);
}
- void mark_interesting_stuff (interesting_t *interest) FINAL OVERRIDE
+ void mark_interesting_stuff (interesting_t *interest) final override
{
if (m_freed_reg)
interest->add_region_creation (m_freed_reg);
@@ -58,20 +58,20 @@ class pattern_test_state_machine : public state_machine
public:
pattern_test_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;
void on_condition (sm_context *sm_ctxt,
const supernode *node,
const gimple *stmt,
const svalue *lhs,
enum tree_code op,
- const svalue *rhs) const FINAL OVERRIDE;
+ const svalue *rhs) const final override;
- bool can_purge_p (state_t s) const FINAL OVERRIDE;
+ bool can_purge_p (state_t s) const final override;
};
class pattern_match : public pending_diagnostic_subclass<pattern_match>
@@ -80,7 +80,7 @@ public:
pattern_match (tree lhs, enum tree_code op, tree rhs)
: m_lhs (lhs), m_op (op), m_rhs (rhs) {}
- const char *get_kind () const FINAL OVERRIDE { return "pattern_match"; }
+ const char *get_kind () const final override { return "pattern_match"; }
bool operator== (const pattern_match &other) const
{
@@ -89,12 +89,12 @@ public:
&& same_tree_p (m_rhs, other.m_rhs));
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return 0;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
return warning_at (rich_loc, get_controlling_option (),
"pattern match on %<%E %s %E%>",
@@ -52,13 +52,13 @@ class sensitive_state_machine : public state_machine
public:
sensitive_state_machine (logger *logger);
- bool inherited_state_p () const FINAL OVERRIDE { return true; }
+ bool inherited_state_p () const final override { return true; }
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;
/* State for "sensitive" data, such as a password. */
state_t m_sensitive;
@@ -81,7 +81,7 @@ public:
: m_sm (sm), m_arg (arg)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "exposure_through_output_file";
}
@@ -91,12 +91,12 @@ public:
return same_tree_p (m_arg, other.m_arg);
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_exposure_through_output_file;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
diagnostic_metadata m;
/* CWE-532: Information Exposure Through Log Files */
@@ -107,7 +107,7 @@ public:
}
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (change.m_new_state == m_sm.m_sensitive)
{
@@ -118,7 +118,7 @@ public:
}
label_text describe_call_with_state (const evdesc::call_with_state &info)
- FINAL OVERRIDE
+ final override
{
if (info.m_state == m_sm.m_sensitive)
return info.formatted_print
@@ -128,7 +128,7 @@ public:
}
label_text describe_return_of_state (const evdesc::return_of_state &info)
- FINAL OVERRIDE
+ final override
{
if (info.m_state == m_sm.m_sensitive)
return info.formatted_print ("returning sensitive value to %qE from %qE",
@@ -136,7 +136,7 @@ public:
return label_text ();
}
- 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_first_sensitive_event.known_p ())
return ev.formatted_print ("sensitive value %qE written to output file"
@@ -75,13 +75,13 @@ class signal_state_machine : public state_machine
public:
signal_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;
/* These states are "global", rather than per-expression. */
@@ -106,19 +106,19 @@ public:
gcc_assert (m_unsafe_fndecl);
}
- const char *get_kind () const FINAL OVERRIDE { return "signal_unsafe_call"; }
+ const char *get_kind () const final override { return "signal_unsafe_call"; }
bool operator== (const signal_unsafe_call &other) const
{
return m_unsafe_call == other.m_unsafe_call;
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_unsafe_call_within_signal_handler;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
auto_diagnostic_group d;
diagnostic_metadata m;
@@ -148,7 +148,7 @@ public:
}
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_in_signal_handler)
@@ -160,7 +160,7 @@ public:
return label_text ();
}
- 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 ("call to %qD from within signal handler",
m_unsafe_fndecl);
@@ -213,7 +213,7 @@ update_model_for_signal_handler (region_model *model,
class signal_delivery_edge_info_t : public custom_edge_info
{
public:
- void print (pretty_printer *pp) const FINAL OVERRIDE
+ void print (pretty_printer *pp) const final override
{
pp_string (pp, "signal delivered");
}
@@ -226,7 +226,7 @@ public:
bool update_model (region_model *model,
const exploded_edge *eedge,
- region_model_context *) const FINAL OVERRIDE
+ region_model_context *) const final override
{
gcc_assert (eedge);
update_model_for_signal_handler (model, eedge->m_dest->get_function ());
@@ -235,7 +235,7 @@ public:
void add_events_to_path (checker_path *emission_path,
const exploded_edge &eedge ATTRIBUTE_UNUSED)
- const FINAL OVERRIDE
+ const final override
{
emission_path->add_event
(new precanned_custom_event
@@ -261,7 +261,7 @@ public:
on the node. */
void impl_transition (exploded_graph *eg,
exploded_node *src_enode,
- int sm_idx) FINAL OVERRIDE
+ int sm_idx) final override
{
function *handler_fun = DECL_STRUCT_FUNCTION (m_fndecl);
if (!handler_fun)
@@ -80,25 +80,25 @@ class taint_state_machine : public state_machine
public:
taint_state_machine (logger *logger);
- bool inherited_state_p () const FINAL OVERRIDE { return true; }
+ bool inherited_state_p () const final override { return true; }
state_t alt_get_inherited_state (const sm_state_map &map,
const svalue *sval,
const extrinsic_state &ext_state)
- const FINAL OVERRIDE;
+ const final override;
bool on_stmt (sm_context *sm_ctxt,
const supernode *node,
- const gimple *stmt) const FINAL OVERRIDE;
+ const gimple *stmt) const final override;
void on_condition (sm_context *sm_ctxt,
const supernode *node,
const gimple *stmt,
const svalue *lhs,
enum tree_code op,
- const svalue *rhs) const FINAL OVERRIDE;
+ const svalue *rhs) const final override;
- bool can_purge_p (state_t s) const FINAL OVERRIDE;
+ bool can_purge_p (state_t s) const final override;
bool get_taint (state_t s, tree type, enum bounds *out) const;
@@ -135,7 +135,7 @@ public:
: m_sm (sm), m_arg (arg), m_has_bounds (has_bounds)
{}
- bool subclass_equal_p (const pending_diagnostic &base_other) const OVERRIDE
+ bool subclass_equal_p (const pending_diagnostic &base_other) const override
{
const taint_diagnostic &other = (const taint_diagnostic &)base_other;
return (same_tree_p (m_arg, other.m_arg)
@@ -143,7 +143,7 @@ public:
}
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (change.m_new_state == m_sm.m_tainted)
{
@@ -180,14 +180,14 @@ public:
: taint_diagnostic (sm, arg, has_bounds)
{}
- const char *get_kind () const FINAL OVERRIDE { return "tainted_array_index"; }
+ const char *get_kind () const final override { return "tainted_array_index"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_tainted_array_index;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
diagnostic_metadata m;
/* CWE-129: "Improper Validation of Array Index". */
@@ -217,7 +217,7 @@ public:
}
}
- label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
+ label_text describe_final_event (const evdesc::final_event &ev) final override
{
switch (m_has_bounds)
{
@@ -253,14 +253,14 @@ public:
: taint_diagnostic (sm, arg, has_bounds)
{}
- const char *get_kind () const FINAL OVERRIDE { return "tainted_offset"; }
+ const char *get_kind () const final override { return "tainted_offset"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_tainted_offset;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
diagnostic_metadata m;
/* CWE-823: "Use of Out-of-range Pointer Offset". */
@@ -312,7 +312,7 @@ public:
}
}
- 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_arg)
switch (m_has_bounds)
@@ -363,14 +363,14 @@ public:
: taint_diagnostic (sm, arg, has_bounds)
{}
- const char *get_kind () const OVERRIDE { return "tainted_size"; }
+ const char *get_kind () const override { return "tainted_size"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_tainted_size;
}
- bool emit (rich_location *rich_loc) OVERRIDE
+ bool emit (rich_location *rich_loc) override
{
diagnostic_metadata m;
m.add_cwe (129);
@@ -399,7 +399,7 @@ public:
}
}
- label_text describe_final_event (const evdesc::final_event &ev) FINAL OVERRIDE
+ label_text describe_final_event (const evdesc::final_event &ev) final override
{
switch (m_has_bounds)
{
@@ -436,12 +436,12 @@ public:
{
}
- const char *get_kind () const OVERRIDE
+ const char *get_kind () const override
{
return "tainted_access_attrib_size";
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
bool warned = tainted_size::emit (rich_loc);
if (warned)
@@ -470,14 +470,14 @@ public:
: taint_diagnostic (sm, arg, has_bounds)
{}
- const char *get_kind () const FINAL OVERRIDE { return "tainted_divisor"; }
+ const char *get_kind () const final override { return "tainted_divisor"; }
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_tainted_divisor;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
diagnostic_metadata m;
/* CWE-369: "Divide By Zero". */
@@ -493,7 +493,7 @@ public:
" without checking for zero");
}
- 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_arg)
return ev.formatted_print
@@ -520,12 +520,12 @@ public:
{
}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "tainted_allocation_size";
}
- bool subclass_equal_p (const pending_diagnostic &base_other) const OVERRIDE
+ bool subclass_equal_p (const pending_diagnostic &base_other) const override
{
if (!taint_diagnostic::subclass_equal_p (base_other))
return false;
@@ -534,12 +534,12 @@ public:
return m_mem_space == other.m_mem_space;
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_tainted_allocation_size;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
diagnostic_metadata m;
/* "CWE-789: Memory Allocation with Excessive Size Value". */
@@ -614,7 +614,7 @@ public:
return warned;
}
- 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_arg)
switch (m_has_bounds)
@@ -236,11 +236,11 @@ public:
state_purge_annotator (const state_purge_map *map) : m_map (map) {}
bool add_node_annotations (graphviz_out *gv, const supernode &n, bool)
- const FINAL OVERRIDE;
+ const final override;
void add_stmt_annotations (graphviz_out *gv, const gimple *stmt,
bool within_row)
- const FINAL OVERRIDE;
+ const final override;
private:
void print_needed (graphviz_out *gv,
@@ -2933,7 +2933,7 @@ store::remove_overlapping_bindings (store_manager *mgr, const region *reg,
struct region_finder : public visitor
{
- void visit_region (const region *reg) FINAL OVERRIDE
+ void visit_region (const region *reg) final override
{
m_regs.add (reg);
}
@@ -347,7 +347,7 @@ public:
concrete_binding (bit_offset_t start_bit_offset, bit_size_t size_in_bits)
: m_bit_range (start_bit_offset, size_in_bits)
{}
- bool concrete_p () const FINAL OVERRIDE { return true; }
+ bool concrete_p () const final override { return true; }
hashval_t hash () const
{
@@ -361,9 +361,9 @@ public:
return m_bit_range == other.m_bit_range;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
- const concrete_binding *dyn_cast_concrete_binding () const FINAL OVERRIDE
+ const concrete_binding *dyn_cast_concrete_binding () const final override
{ return this; }
const bit_range &get_bit_range () const { return m_bit_range; }
@@ -415,7 +415,7 @@ public:
typedef symbolic_binding key_t;
symbolic_binding (const region *region) : m_region (region) {}
- bool concrete_p () const FINAL OVERRIDE { return false; }
+ bool concrete_p () const final override { return false; }
hashval_t hash () const
{
@@ -426,9 +426,9 @@ public:
return m_region == other.m_region;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
- const symbolic_binding *dyn_cast_symbolic_binding () const FINAL OVERRIDE
+ const symbolic_binding *dyn_cast_symbolic_binding () const final override
{ return this; }
const region *get_region () const { return m_region; }
@@ -245,7 +245,7 @@ class supernode : public dnode<supergraph_traits>
return m_bb == EXIT_BLOCK_PTR_FOR_FN (m_fun);
}
- void dump_dot (graphviz_out *gv, const dump_args_t &args) const OVERRIDE;
+ void dump_dot (graphviz_out *gv, const dump_args_t &args) const override;
void dump_dot_id (pretty_printer *pp) const;
json::object *to_json () const;
@@ -389,14 +389,14 @@ class callgraph_superedge : public superedge
{}
void dump_label_to_pp (pretty_printer *pp, bool user_facing) const
- FINAL OVERRIDE;
+ final override;
- callgraph_superedge *dyn_cast_callgraph_superedge () FINAL OVERRIDE
+ callgraph_superedge *dyn_cast_callgraph_superedge () final override
{
return this;
}
const callgraph_superedge *dyn_cast_callgraph_superedge () const
- FINAL OVERRIDE
+ final override
{
return this;
}
@@ -439,11 +439,11 @@ class call_superedge : public callgraph_superedge
: callgraph_superedge (src, dst, SUPEREDGE_CALL, cedge)
{}
- call_superedge *dyn_cast_call_superedge () FINAL OVERRIDE
+ call_superedge *dyn_cast_call_superedge () final override
{
return this;
}
- const call_superedge *dyn_cast_call_superedge () const FINAL OVERRIDE
+ const call_superedge *dyn_cast_call_superedge () const final override
{
return this;
}
@@ -475,8 +475,8 @@ class return_superedge : public callgraph_superedge
: callgraph_superedge (src, dst, SUPEREDGE_RETURN, cedge)
{}
- return_superedge *dyn_cast_return_superedge () FINAL OVERRIDE { return this; }
- const return_superedge *dyn_cast_return_superedge () const FINAL OVERRIDE
+ return_superedge *dyn_cast_return_superedge () final override { return this; }
+ const return_superedge *dyn_cast_return_superedge () const final override
{
return this;
}
@@ -509,9 +509,9 @@ class cfg_superedge : public superedge
m_cfg_edge (e)
{}
- void dump_label_to_pp (pretty_printer *pp, bool user_facing) const OVERRIDE;
- cfg_superedge *dyn_cast_cfg_superedge () FINAL OVERRIDE { return this; }
- const cfg_superedge *dyn_cast_cfg_superedge () const FINAL OVERRIDE { return this; }
+ void dump_label_to_pp (pretty_printer *pp, bool user_facing) const override;
+ cfg_superedge *dyn_cast_cfg_superedge () final override { return this; }
+ const cfg_superedge *dyn_cast_cfg_superedge () const final override { return this; }
::edge get_cfg_edge () const { return m_cfg_edge; }
int get_flags () const { return m_cfg_edge->flags; }
@@ -547,13 +547,13 @@ class switch_cfg_superedge : public cfg_superedge {
switch_cfg_superedge (supernode *src, supernode *dst, ::edge e);
const switch_cfg_superedge *dyn_cast_switch_cfg_superedge () const
- FINAL OVERRIDE
+ final override
{
return this;
}
void dump_label_to_pp (pretty_printer *pp, bool user_facing) const
- FINAL OVERRIDE;
+ final override;
gswitch *get_switch_stmt () const
{
@@ -229,14 +229,14 @@ public:
gcc_assert (m_reg != NULL);
}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_REGION; }
+ enum svalue_kind get_kind () const final override { return SK_REGION; }
const region_svalue *
- dyn_cast_region_svalue () const FINAL OVERRIDE { return this; }
+ dyn_cast_region_svalue () const final override { return this; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
bool implicitly_live_p (const svalue_set *,
- const region_model *) const FINAL OVERRIDE;
+ const region_model *) const final override;
const region * get_pointee () const { return m_reg; }
@@ -278,14 +278,14 @@ public:
gcc_assert (CONSTANT_CLASS_P (cst_expr));
}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_CONSTANT; }
+ enum svalue_kind get_kind () const final override { return SK_CONSTANT; }
const constant_svalue *
- dyn_cast_constant_svalue () const FINAL OVERRIDE { return this; }
+ dyn_cast_constant_svalue () const final override { return this; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
bool implicitly_live_p (const svalue_set *,
- const region_model *) const FINAL OVERRIDE;
+ const region_model *) const final override;
tree get_constant () const { return m_cst_expr; }
static tristate eval_condition (const constant_svalue *lhs,
@@ -295,9 +295,9 @@ public:
const svalue *
maybe_fold_bits_within (tree type,
const bit_range &subrange,
- region_model_manager *mgr) const FINAL OVERRIDE;
+ region_model_manager *mgr) const final override;
- bool all_zeroes_p () const FINAL OVERRIDE;
+ bool all_zeroes_p () const final override;
private:
tree m_cst_expr;
@@ -327,18 +327,18 @@ public:
: svalue (complexity (1, 1), type)
{}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_UNKNOWN; }
+ enum svalue_kind get_kind () const final override { return SK_UNKNOWN; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
const svalue *
maybe_fold_bits_within (tree type,
const bit_range &subrange,
- region_model_manager *mgr) const FINAL OVERRIDE;
+ region_model_manager *mgr) const final override;
/* Unknown values are singletons per-type, so can't have state. */
- bool can_have_associated_state_p () const FINAL OVERRIDE { return false; }
+ bool can_have_associated_state_p () const final override { return false; }
};
/* An enum describing a particular kind of "poisoned" value. */
@@ -395,22 +395,22 @@ public:
poisoned_svalue (enum poison_kind kind, tree type)
: svalue (complexity (1, 1), type), m_kind (kind) {}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_POISONED; }
+ enum svalue_kind get_kind () const final override { return SK_POISONED; }
const poisoned_svalue *
- dyn_cast_poisoned_svalue () const FINAL OVERRIDE { return this; }
+ dyn_cast_poisoned_svalue () const final override { return this; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
const svalue *
maybe_fold_bits_within (tree type,
const bit_range &subrange,
- region_model_manager *mgr) const FINAL OVERRIDE;
+ region_model_manager *mgr) const final override;
enum poison_kind get_poison_kind () const { return m_kind; }
/* Poisoned svalues are singletons per-type, so can't have state. */
- bool can_have_associated_state_p () const FINAL OVERRIDE { return false; }
+ bool can_have_associated_state_p () const final override { return false; }
private:
enum poison_kind m_kind;
@@ -504,12 +504,12 @@ public:
: svalue (complexity (1, 1), type), m_setjmp_record (setjmp_record)
{}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_SETJMP; }
+ enum svalue_kind get_kind () const final override { return SK_SETJMP; }
const setjmp_svalue *
- dyn_cast_setjmp_svalue () const FINAL OVERRIDE { return this; }
+ dyn_cast_setjmp_svalue () const final override { return this; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
int get_enode_index () const;
@@ -554,14 +554,14 @@ public:
gcc_assert (m_reg != NULL);
}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_INITIAL; }
+ enum svalue_kind get_kind () const final override { return SK_INITIAL; }
const initial_svalue *
- dyn_cast_initial_svalue () const FINAL OVERRIDE { return this; }
+ dyn_cast_initial_svalue () const final override { return this; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
bool implicitly_live_p (const svalue_set *,
- const region_model *) const FINAL OVERRIDE;
+ const region_model *) const final override;
bool initial_value_of_param_p () const;
@@ -628,14 +628,14 @@ public:
gcc_assert (arg->can_have_associated_state_p ());
}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_UNARYOP; }
+ enum svalue_kind get_kind () const final override { return SK_UNARYOP; }
const unaryop_svalue *
- dyn_cast_unaryop_svalue () const FINAL OVERRIDE { return this; }
+ dyn_cast_unaryop_svalue () const final override { return this; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
bool implicitly_live_p (const svalue_set *,
- const region_model *) const FINAL OVERRIDE;
+ const region_model *) const final override;
enum tree_code get_op () const { return m_op; }
const svalue *get_arg () const { return m_arg; }
@@ -643,7 +643,7 @@ public:
const svalue *
maybe_fold_bits_within (tree type,
const bit_range &subrange,
- region_model_manager *mgr) const FINAL OVERRIDE;
+ region_model_manager *mgr) const final override;
private:
enum tree_code m_op;
@@ -722,16 +722,16 @@ public:
gcc_assert (arg1->can_have_associated_state_p ());
}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_BINOP; }
- const binop_svalue *dyn_cast_binop_svalue () const FINAL OVERRIDE
+ enum svalue_kind get_kind () const final override { return SK_BINOP; }
+ const binop_svalue *dyn_cast_binop_svalue () const final override
{
return this;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
bool implicitly_live_p (const svalue_set *,
- const region_model *) const FINAL OVERRIDE;
+ const region_model *) const final override;
enum tree_code get_op () const { return m_op; }
const svalue *get_arg0 () const { return m_arg0; }
@@ -803,16 +803,16 @@ public:
sub_svalue (tree type, const svalue *parent_svalue,
const region *subregion);
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_SUB; }
- const sub_svalue *dyn_cast_sub_svalue () const FINAL OVERRIDE
+ enum svalue_kind get_kind () const final override { return SK_SUB; }
+ const sub_svalue *dyn_cast_sub_svalue () const final override
{
return this;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
bool implicitly_live_p (const svalue_set *,
- const region_model *) const FINAL OVERRIDE;
+ const region_model *) const final override;
const svalue *get_parent () const { return m_parent_svalue; }
const region *get_subregion () const { return m_subregion; }
@@ -885,24 +885,24 @@ public:
const svalue *outer_size,
const svalue *inner_svalue);
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_REPEATED; }
- const repeated_svalue *dyn_cast_repeated_svalue () const FINAL OVERRIDE
+ enum svalue_kind get_kind () const final override { return SK_REPEATED; }
+ const repeated_svalue *dyn_cast_repeated_svalue () const final override
{
return this;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
const svalue *get_outer_size () const { return m_outer_size; }
const svalue *get_inner_svalue () const { return m_inner_svalue; }
- bool all_zeroes_p () const FINAL OVERRIDE;
+ bool all_zeroes_p () const final override;
const svalue *
maybe_fold_bits_within (tree type,
const bit_range &subrange,
- region_model_manager *mgr) const FINAL OVERRIDE;
+ region_model_manager *mgr) const final override;
private:
const svalue *m_outer_size;
@@ -972,17 +972,17 @@ public:
const bit_range &bits,
const svalue *inner_svalue);
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_BITS_WITHIN; }
+ enum svalue_kind get_kind () const final override { return SK_BITS_WITHIN; }
const bits_within_svalue *
- dyn_cast_bits_within_svalue () const FINAL OVERRIDE
+ dyn_cast_bits_within_svalue () const final override
{
return this;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
bool implicitly_live_p (const svalue_set *,
- const region_model *) const FINAL OVERRIDE;
+ const region_model *) const final override;
const bit_range &get_bits () const { return m_bits; }
const svalue *get_inner_svalue () const { return m_inner_svalue; }
@@ -990,7 +990,7 @@ public:
const svalue *
maybe_fold_bits_within (tree type,
const bit_range &subrange,
- region_model_manager *mgr) const FINAL OVERRIDE;
+ region_model_manager *mgr) const final override;
private:
const bit_range m_bits;
@@ -1034,14 +1034,14 @@ public:
{
}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_UNMERGEABLE; }
+ enum svalue_kind get_kind () const final override { return SK_UNMERGEABLE; }
const unmergeable_svalue *
- dyn_cast_unmergeable_svalue () const FINAL OVERRIDE { return this; }
+ dyn_cast_unmergeable_svalue () const final override { return this; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
bool implicitly_live_p (const svalue_set *,
- const region_model *) const FINAL OVERRIDE;
+ const region_model *) const final override;
const svalue *get_arg () const { return m_arg; }
@@ -1074,10 +1074,10 @@ public:
{
}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_PLACEHOLDER; }
+ enum svalue_kind get_kind () const final override { return SK_PLACEHOLDER; }
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
const char *get_name () const { return m_name; }
@@ -1165,14 +1165,14 @@ public:
gcc_assert (iter_sval->can_have_associated_state_p ());
}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_WIDENING; }
- const widening_svalue *dyn_cast_widening_svalue () const FINAL OVERRIDE
+ enum svalue_kind get_kind () const final override { return SK_WIDENING; }
+ const widening_svalue *dyn_cast_widening_svalue () const final override
{
return this;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
const function_point &get_point () const { return m_point; }
const svalue *get_base_svalue () const { return m_base_sval; }
@@ -1260,14 +1260,14 @@ public:
compound_svalue (tree type, const binding_map &map);
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_COMPOUND; }
- const compound_svalue *dyn_cast_compound_svalue () const FINAL OVERRIDE
+ enum svalue_kind get_kind () const final override { return SK_COMPOUND; }
+ const compound_svalue *dyn_cast_compound_svalue () const final override
{
return this;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
const binding_map &get_map () const { return m_map; }
@@ -1282,7 +1282,7 @@ public:
const svalue *
maybe_fold_bits_within (tree type,
const bit_range &subrange,
- region_model_manager *mgr) const FINAL OVERRIDE;
+ region_model_manager *mgr) const final override;
private:
static complexity calc_complexity (const binding_map &map);
@@ -1394,14 +1394,14 @@ public:
gcc_assert (m_stmt != NULL);
}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_CONJURED; }
- const conjured_svalue *dyn_cast_conjured_svalue () const FINAL OVERRIDE
+ enum svalue_kind get_kind () const final override { return SK_CONJURED; }
+ const conjured_svalue *dyn_cast_conjured_svalue () const final override
{
return this;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
const gimple *get_stmt () const { return m_stmt; }
const region *get_id_region () const { return m_id_reg; }
@@ -1515,15 +1515,15 @@ public:
m_input_arr[i] = inputs[i];
}
- enum svalue_kind get_kind () const FINAL OVERRIDE { return SK_ASM_OUTPUT; }
+ enum svalue_kind get_kind () const final override { return SK_ASM_OUTPUT; }
const asm_output_svalue *
- dyn_cast_asm_output_svalue () const FINAL OVERRIDE
+ dyn_cast_asm_output_svalue () const final override
{
return this;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
const char *get_asm_string () const { return m_asm_string; }
unsigned get_output_idx () const { return m_output_idx; }
@@ -1643,18 +1643,18 @@ public:
m_input_arr[i] = inputs[i];
}
- enum svalue_kind get_kind () const FINAL OVERRIDE
+ enum svalue_kind get_kind () const final override
{
return SK_CONST_FN_RESULT;
}
const const_fn_result_svalue *
- dyn_cast_const_fn_result_svalue () const FINAL OVERRIDE
+ dyn_cast_const_fn_result_svalue () const final override
{
return this;
}
- void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
- void accept (visitor *v) const FINAL OVERRIDE;
+ void dump_to_pp (pretty_printer *pp, bool simple) const final override;
+ void accept (visitor *v) const final override;
tree get_fndecl () const { return m_fndecl; }
unsigned get_num_inputs () const { return m_num_inputs; }
@@ -61,7 +61,7 @@ public:
: m_inner_node (inner_node) {}
void dump_dot (graphviz_out *gv,
- const dump_args_t &args) const FINAL OVERRIDE;
+ const dump_args_t &args) const final override;
private:
const exploded_node *m_inner_node;
@@ -77,7 +77,7 @@ class trimmed_edge : public dedge<tg_traits>
const exploded_edge *inner_edge);
void dump_dot (graphviz_out *gv,
- const dump_args_t &args) const FINAL OVERRIDE;
+ const dump_args_t &args) const final override;
private:
const exploded_edge *m_inner_edge;
@@ -206,17 +206,17 @@ class va_list_state_machine : public state_machine
public:
va_list_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
{
return s != m_started;
}
- pending_diagnostic *on_leak (tree var) const FINAL OVERRIDE;
+ pending_diagnostic *on_leak (tree var) const final override;
/* State for a va_list that the result of a va_start or va_copy. */
state_t m_started;
@@ -319,7 +319,7 @@ get_stateful_arg (sm_context *sm_ctxt, const gcall *call, unsigned arg_idx)
class va_list_sm_diagnostic : public pending_diagnostic
{
public:
- bool subclass_equal_p (const pending_diagnostic &base_other) const OVERRIDE
+ bool subclass_equal_p (const pending_diagnostic &base_other) const override
{
const va_list_sm_diagnostic &other
= (const va_list_sm_diagnostic &)base_other;
@@ -328,7 +328,7 @@ public:
}
label_text describe_state_change (const evdesc::state_change &change)
- OVERRIDE
+ override
{
if (const char *fnname = maybe_get_fnname (change))
return change.formatted_print ("%qs called here", fnname);
@@ -380,7 +380,7 @@ public:
{
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_va_list_use_after_va_end;
}
@@ -391,27 +391,27 @@ public:
&& 0 == strcmp (m_usage_fnname, other.m_usage_fnname));
}
- 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 (),
"%qs after %qs", m_usage_fnname, "va_end");
}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "va_list_use_after_va_end";
}
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (change.m_new_state == m_sm.m_ended)
m_va_end_event = change.m_event_id;
return va_list_sm_diagnostic::describe_state_change (change);
}
- 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 (ev.m_expr)
{
@@ -456,7 +456,7 @@ public:
{
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_va_list_leak;
}
@@ -473,10 +473,10 @@ public:
"missing call to %qs", "va_end");
}
- const char *get_kind () const FINAL OVERRIDE { return "va_list_leak"; }
+ const char *get_kind () const final override { return "va_list_leak"; }
label_text describe_state_change (const evdesc::state_change &change)
- FINAL OVERRIDE
+ final override
{
if (change.m_new_state == m_sm.m_started)
{
@@ -486,7 +486,7 @@ public:
return va_list_sm_diagnostic::describe_state_change (change);
}
- 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 (ev.m_expr)
{
@@ -718,7 +718,7 @@ public:
/* Override of pending_diagnostic::add_call_event,
adding a custom call_event subclass. */
void add_call_event (const exploded_edge &eedge,
- checker_path *emission_path) OVERRIDE
+ checker_path *emission_path) override
{
/* As per call_event, but show the number of variadic arguments
in the call. */
@@ -733,7 +733,7 @@ public:
{
}
- label_text get_desc (bool can_colorize) const OVERRIDE
+ label_text get_desc (bool can_colorize) const override
{
return make_label_text_n
(can_colorize, m_num_variadic_arguments,
@@ -778,7 +778,7 @@ protected:
: m_va_list_tree (va_list_tree), m_var_arg_reg (var_arg_reg)
{}
- bool subclass_equal_p (const pending_diagnostic &base_other) const OVERRIDE
+ bool subclass_equal_p (const pending_diagnostic &base_other) const override
{
const va_arg_diagnostic &other = (const va_arg_diagnostic &)base_other;
return (same_tree_p (m_va_list_tree, other.m_va_list_tree)
@@ -819,13 +819,13 @@ public:
m_expected_type (expected_type), m_actual_type (actual_type)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "va_arg_type_mismatch";
}
bool subclass_equal_p (const pending_diagnostic &base_other)
- const FINAL OVERRIDE
+ const final override
{
if (!va_arg_diagnostic::subclass_equal_p (base_other))
return false;
@@ -835,12 +835,12 @@ public:
&& same_tree_p (m_actual_type, other.m_actual_type));
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_va_arg_type_mismatch;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
auto_diagnostic_group d;
bool warned
@@ -852,7 +852,7 @@ public:
return warned;
}
- 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 ("%<va_arg%> expected %qT but received %qT"
" for variadic argument %i of %qE",
@@ -877,17 +877,17 @@ public:
: va_arg_diagnostic (va_list_tree, var_arg_reg)
{}
- const char *get_kind () const FINAL OVERRIDE
+ const char *get_kind () const final override
{
return "va_list_exhausted";
}
- int get_controlling_option () const FINAL OVERRIDE
+ int get_controlling_option () const final override
{
return OPT_Wanalyzer_va_list_exhausted;
}
- bool emit (rich_location *rich_loc) FINAL OVERRIDE
+ bool emit (rich_location *rich_loc) final override
{
auto_diagnostic_group d;
bool warned = warning_at (rich_loc, get_controlling_option (),
@@ -896,7 +896,7 @@ public:
return warned;
}
- 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 ("%qE has no more arguments (%i consumed)",
m_va_list_tree, get_num_consumed ());