Use "final" and "override" directly, rather than via macros

As of GCC 11 onwards we have required a C++11 compiler, such as GCC 4.8
or later.  On the assumption that any such compiler correctly implements
"final" and "override", this patch updates the source tree to stop using
the FINAL and OVERRIDE macros from ansidecl.h, in favor of simply using
"final" and "override" directly.

libcpp/ChangeLog:
	* lex.cc: Replace uses of "FINAL" and "OVERRIDE" with "final" and
	"override".

gcc/analyzer/ChangeLog:
	* analyzer-pass.cc: Replace uses of "FINAL" and "OVERRIDE" with
	"final" and "override".
	* call-info.h: Likewise.
	* checker-path.h: Likewise.
	* constraint-manager.cc: Likewise.
	* diagnostic-manager.cc: Likewise.
	* engine.cc: Likewise.
	* exploded-graph.h: Likewise.
	* feasible-graph.h: Likewise.
	* pending-diagnostic.h: Likewise.
	* region-model-impl-calls.cc: Likewise.
	* region-model.cc: Likewise.
	* region-model.h: Likewise.
	* region.h: Likewise.
	* sm-file.cc: Likewise.
	* sm-malloc.cc: Likewise.
	* sm-pattern-test.cc: Likewise.
	* sm-sensitive.cc: Likewise.
	* sm-signal.cc: Likewise.
	* sm-taint.cc: Likewise.
	* state-purge.h: Likewise.
	* store.cc: Likewise.
	* store.h: Likewise.
	* supergraph.h: Likewise.
	* svalue.h: Likewise.
	* trimmed-graph.h: Likewise.
	* varargs.cc: Likewise.

gcc/c-family/ChangeLog:
	* c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
	and "override".
	* c-pretty-print.h: Likewise.

gcc/cp/ChangeLog:
	* cxx-pretty-print.h: Replace uses of "FINAL" and "OVERRIDE" with
	"final" and "override".
	* error.cc: Likewise.

gcc/jit/ChangeLog:
	* jit-playback.h: Replace uses of "FINAL" and "OVERRIDE" with
	"final" and "override".
	* jit-recording.cc: Likewise.
	* jit-recording.h: Likewise.

gcc/ChangeLog:
	* config/aarch64/aarch64-sve-builtins-base.cc: Replace uses of
	"FINAL" and "OVERRIDE" with "final" and "override".
	* config/aarch64/aarch64-sve-builtins-functions.h: Likewise.
	* config/aarch64/aarch64-sve-builtins-shapes.cc: Likewise.
	* config/aarch64/aarch64-sve-builtins-sve2.cc: Likewise.
	* diagnostic-path.h: Likewise.
	* digraph.cc: Likewise.
	* gcc-rich-location.h: Likewise.
	* gimple-array-bounds.cc: Likewise.
	* gimple-loop-versioning.cc: Likewise.
	* gimple-range-cache.cc: Likewise.
	* gimple-range-cache.h: Likewise.
	* gimple-range-fold.cc: Likewise.
	* gimple-range-fold.h: Likewise.
	* gimple-range-tests.cc: Likewise.
	* gimple-range.h: Likewise.
	* gimple-ssa-evrp.cc: Likewise.
	* input.cc: Likewise.
	* json.h: Likewise.
	* read-rtl-function.cc: Likewise.
	* tree-complex.cc: Likewise.
	* tree-diagnostic-path.cc: Likewise.
	* tree-ssa-ccp.cc: Likewise.
	* tree-ssa-copy.cc: Likewise.
	* tree-vrp.cc: Likewise.
	* value-query.h: Likewise.
	* vr-values.h: Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
This commit is contained in:
David Malcolm 2022-05-20 10:05:54 -04:00
parent 6c420193e8
commit ff171cb13d
60 changed files with 1345 additions and 1345 deletions

View File

@ -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. */

View File

@ -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) {}

View File

@ -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];
}

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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
{

View File

@ -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; }

View File

@ -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;

View File

@ -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 ())

View File

@ -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");
}

View File

@ -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)));

View File

@ -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

View File

@ -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 ())
{

View File

@ -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);

View File

@ -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%>",

View File

@ -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"

View 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)

View File

@ -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)

View File

@ -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,

View File

@ -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);
}

View File

@ -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; }

View File

@ -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
{

View File

@ -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; }

View File

@ -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;

View File

@ -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 ());

View File

@ -4613,7 +4613,7 @@ class range_label_for_format_type_mismatch
{
}
label_text get_text (unsigned range_idx) const FINAL OVERRIDE
label_text get_text (unsigned range_idx) const final override
{
label_text text = range_label_for_type_mismatch::get_text (range_idx);
if (text.m_buffer == NULL)

View File

@ -51,7 +51,7 @@ class c_pretty_printer : public pretty_printer
{
public:
c_pretty_printer ();
pretty_printer *clone () const OVERRIDE;
pretty_printer *clone () const override;
// Format string, possibly translated.
void translate_string (const char *);

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@ public:
: T (t1, t2, t3) {}
unsigned int
call_properties (const function_instance &) const OVERRIDE
call_properties (const function_instance &) const override
{
return 0;
}
@ -59,7 +59,7 @@ public:
: m_vectors_per_tuple (vectors_per_tuple) {}
unsigned int
vectors_per_tuple () const OVERRIDE
vectors_per_tuple () const override
{
return m_vectors_per_tuple;
}
@ -78,13 +78,13 @@ public:
: multi_vector_function (vectors_per_tuple) {}
tree
memory_scalar_type (const function_instance &fi) const OVERRIDE
memory_scalar_type (const function_instance &fi) const override
{
return fi.scalar_type (0);
}
machine_mode
memory_vector_mode (const function_instance &fi) const OVERRIDE
memory_vector_mode (const function_instance &fi) const override
{
machine_mode mode = fi.vector_mode (0);
if (m_vectors_per_tuple != 1)
@ -103,19 +103,19 @@ public:
: m_memory_type (memory_type) {}
unsigned int
call_properties (const function_instance &) const OVERRIDE
call_properties (const function_instance &) const override
{
return CP_READ_MEMORY;
}
tree
memory_scalar_type (const function_instance &) const OVERRIDE
memory_scalar_type (const function_instance &) const override
{
return scalar_types[type_suffixes[m_memory_type].vector_type];
}
machine_mode
memory_vector_mode (const function_instance &fi) const OVERRIDE
memory_vector_mode (const function_instance &fi) const override
{
machine_mode mem_mode = type_suffixes[m_memory_type].vector_mode;
machine_mode reg_mode = fi.vector_mode (0);
@ -145,13 +145,13 @@ public:
CONSTEXPR truncating_store (scalar_int_mode to_mode) : m_to_mode (to_mode) {}
unsigned int
call_properties (const function_instance &) const OVERRIDE
call_properties (const function_instance &) const override
{
return CP_WRITE_MEMORY;
}
tree
memory_scalar_type (const function_instance &fi) const OVERRIDE
memory_scalar_type (const function_instance &fi) const override
{
/* In truncating stores, the signedness of the memory element is defined
to be the same as the signedness of the vector element. The signedness
@ -163,7 +163,7 @@ public:
}
machine_mode
memory_vector_mode (const function_instance &fi) const OVERRIDE
memory_vector_mode (const function_instance &fi) const override
{
poly_uint64 nunits = GET_MODE_NUNITS (fi.vector_mode (0));
return aarch64_sve_data_mode (m_to_mode, nunits).require ();
@ -205,7 +205,7 @@ public:
: rtx_code_function_base (code_for_sint, code_for_uint, unspec_for_fp) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
return e.map_to_rtx_codes (m_code_for_sint, m_code_for_uint,
m_unspec_for_fp);
@ -225,7 +225,7 @@ public:
: rtx_code_function_base (code_for_sint, code_for_uint, unspec_for_fp) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
/* Rotate the inputs into their normal order, but continue to make _m
functions merge with what was originally the first vector argument. */
@ -279,7 +279,7 @@ public:
{}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
return e.map_to_unspecs (m_unspec_for_sint, m_unspec_for_uint,
m_unspec_for_fp);
@ -301,7 +301,7 @@ public:
{}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
/* Rotate the inputs into their normal order, but continue to make _m
functions merge with what was originally the first vector argument. */
@ -329,7 +329,7 @@ public:
{}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
return e.use_exact_insn (CODE (unspec_for (e), e.vector_mode (0)));
}
@ -386,7 +386,7 @@ public:
{}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
int unspec = unspec_for (e);
insn_code icode;
@ -421,7 +421,7 @@ public:
{}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
int unspec = unspec_for (e);
insn_code icode;
@ -451,7 +451,7 @@ class code_for_mode_function : public function_base
{
public:
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
return e.use_exact_insn (CODE_FOR_MODE (e.vector_mode (N)));
}
@ -477,7 +477,7 @@ public:
CONSTEXPR fixed_insn_function (insn_code code) : m_code (code) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
return e.use_exact_insn (m_code);
}
@ -519,7 +519,7 @@ public:
CONSTEXPR binary_permute (int unspec) : m_unspec (unspec) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
insn_code icode = code_for_aarch64_sve (m_unspec, e.vector_mode (0));
return e.use_exact_insn (icode);
@ -547,7 +547,7 @@ public:
{}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
machine_mode mode = e.vector_mode (0);
int unspec = (!e.type_suffix (0).integer_p ? m_unspec_for_fp
@ -576,7 +576,7 @@ public:
: m_code (code), m_wide_unspec (wide_unspec) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
machine_mode mode = e.vector_mode (0);
machine_mode elem_mode = GET_MODE_INNER (mode);
@ -610,7 +610,7 @@ public:
CONSTEXPR unary_count (rtx_code code) : m_code (code) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
/* The md patterns treat the operand as an integer. */
machine_mode mode = aarch64_sve_int_mode (e.vector_mode (0));
@ -636,7 +636,7 @@ public:
{}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
/* Suffix 0 determines the predicate mode, suffix 1 determines the
scalar mode and signedness. */

File diff suppressed because it is too large Load Diff

View File

@ -82,7 +82,7 @@ class svaba_impl : public function_base
{
public:
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
rtx_code max_code = e.type_suffix (0).unsigned_p ? UMAX : SMAX;
machine_mode mode = e.vector_mode (0);
@ -94,7 +94,7 @@ class svcdot_impl : public function_base
{
public:
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
/* Convert the rotation amount into a specific unspec. */
int rot = INTVAL (e.args.pop ());
@ -107,7 +107,7 @@ class svcdot_lane_impl : public function_base
{
public:
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
/* Convert the rotation amount into a specific unspec. */
int rot = INTVAL (e.args.pop ());
@ -120,13 +120,13 @@ class svldnt1_gather_impl : public full_width_access
{
public:
unsigned int
call_properties (const function_instance &) const OVERRIDE
call_properties (const function_instance &) const override
{
return CP_READ_MEMORY;
}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
e.prepare_gather_address_operands (1, false);
machine_mode mem_mode = e.memory_vector_mode ();
@ -142,7 +142,7 @@ public:
: extending_load (memory_type) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
e.prepare_gather_address_operands (1, false);
/* Add a constant predicate for the extension rtx. */
@ -162,7 +162,7 @@ public:
CONSTEXPR svmatch_svnmatch_impl (int unspec) : m_unspec (unspec) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
/* These are UNSPEC_PRED_Z operations and so need a hint operand. */
e.add_ptrue_hint (0, e.gp_mode (0));
@ -185,7 +185,7 @@ public:
{}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
e.args.quick_push (const0_rtx);
return e.map_to_unspecs (m_unspec_for_sint, m_unspec_for_uint,
@ -197,7 +197,7 @@ class svqcadd_impl : public function_base
{
public:
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
/* Convert the rotation amount into a specific unspec. */
int rot = INTVAL (e.args.pop ());
@ -213,7 +213,7 @@ class svqrdcmlah_impl : public function_base
{
public:
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
/* Convert the rotation amount into a specific unspec. */
int rot = INTVAL (e.args.pop ());
@ -226,7 +226,7 @@ class svqrdcmlah_lane_impl : public function_base
{
public:
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
/* Convert the rotation amount into a specific unspec. */
int rot = INTVAL (e.args.pop ());
@ -242,7 +242,7 @@ public:
: unspec_based_function (UNSPEC_SQRSHL, UNSPEC_UQRSHL, -1) {}
gimple *
fold (gimple_folder &f) const OVERRIDE
fold (gimple_folder &f) const override
{
if (tree amount = uniform_integer_cst_p (gimple_call_arg (f.call, 2)))
{
@ -276,7 +276,7 @@ public:
: unspec_based_function (UNSPEC_SQSHL, UNSPEC_UQSHL, -1) {}
gimple *
fold (gimple_folder &f) const OVERRIDE
fold (gimple_folder &f) const override
{
if (tree amount = uniform_integer_cst_p (gimple_call_arg (f.call, 2)))
{
@ -312,7 +312,7 @@ public:
: unspec_based_function (UNSPEC_SRSHL, UNSPEC_URSHL, -1) {}
gimple *
fold (gimple_folder &f) const OVERRIDE
fold (gimple_folder &f) const override
{
if (tree amount = uniform_integer_cst_p (gimple_call_arg (f.call, 2)))
{
@ -349,7 +349,7 @@ class svsqadd_impl : public function_base
{
public:
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
machine_mode mode = e.vector_mode (0);
if (e.pred == PRED_x
@ -363,7 +363,7 @@ class svsra_impl : public function_base
{
public:
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
rtx_code shift_code = e.type_suffix (0).unsigned_p ? LSHIFTRT : ASHIFTRT;
machine_mode mode = e.vector_mode (0);
@ -375,13 +375,13 @@ class svstnt1_scatter_impl : public full_width_access
{
public:
unsigned int
call_properties (const function_instance &) const OVERRIDE
call_properties (const function_instance &) const override
{
return CP_WRITE_MEMORY;
}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
e.prepare_gather_address_operands (1, false);
machine_mode mem_mode = e.memory_vector_mode ();
@ -397,7 +397,7 @@ public:
: truncating_store (to_mode) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
e.prepare_gather_address_operands (1, false);
insn_code icode = code_for_aarch64_scatter_stnt (e.vector_mode (0),
@ -412,7 +412,7 @@ public:
CONSTEXPR svtbl2_impl () : quiet<multi_vector_function> (2) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_aarch64_sve2_tbl2 (e.vector_mode (0)));
}
@ -422,7 +422,7 @@ class svuqadd_impl : public function_base
{
public:
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
machine_mode mode = e.vector_mode (0);
if (e.pred == PRED_x
@ -440,7 +440,7 @@ public:
CONSTEXPR svwhilerw_svwhilewr_impl (int unspec) : m_unspec (unspec) {}
rtx
expand (function_expander &e) const OVERRIDE
expand (function_expander &e) const override
{
for (unsigned int i = 0; i < 2; ++i)
e.args[i] = e.convert_to_pmode (e.args[i]);

View File

@ -34,7 +34,7 @@ class cxx_pretty_printer : public c_pretty_printer
public:
cxx_pretty_printer ();
pretty_printer *clone () const OVERRIDE;
pretty_printer *clone () const override;
void constant (tree);
void id_expression (tree);

View File

@ -144,12 +144,12 @@ class cxx_format_postprocessor : public format_postprocessor
: m_type_a (), m_type_b ()
{}
format_postprocessor *clone() const FINAL OVERRIDE
format_postprocessor *clone() const final override
{
return new cxx_format_postprocessor ();
}
void handle (pretty_printer *pp) FINAL OVERRIDE;
void handle (pretty_printer *pp) final override;
deferred_printed_type m_type_a;
deferred_printed_type m_type_b;

View File

@ -106,10 +106,10 @@ class simple_diagnostic_event : public diagnostic_event
const char *desc);
~simple_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; }
label_text get_desc (bool) const FINAL OVERRIDE
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; }
label_text get_desc (bool) const final override
{
return label_text::borrow (m_desc);
}
@ -130,8 +130,8 @@ class simple_diagnostic_path : public diagnostic_path
simple_diagnostic_path (pretty_printer *event_pp)
: m_event_pp (event_pp) {}
unsigned num_events () const FINAL OVERRIDE;
const diagnostic_event & get_event (int idx) const FINAL OVERRIDE;
unsigned num_events () const final override;
const diagnostic_event & get_event (int idx) const final override;
diagnostic_event_id_t add_event (location_t loc, tree fndecl, int depth,
const char *fmt, ...)

View File

@ -51,7 +51,7 @@ struct test_graph_traits
struct test_node : public dnode<test_graph_traits>
{
test_node (const char *name, int index) : m_name (name), m_index (index) {}
void dump_dot (graphviz_out *, const dump_args_t &) const OVERRIDE
void dump_dot (graphviz_out *, const dump_args_t &) const override
{
}
@ -65,7 +65,7 @@ struct test_edge : public dedge<test_graph_traits>
: dedge<test_graph_traits> (src, dest)
{}
void dump_dot (graphviz_out *gv, const dump_args_t &) const OVERRIDE
void dump_dot (graphviz_out *gv, const dump_args_t &) const override
{
gv->println ("%s %s %s%c", m_src->m_name, "->", m_dest->m_name, ';');
}

View File

@ -113,7 +113,7 @@ class text_range_label : public range_label
public:
text_range_label (const char *text) : m_text (text) {}
label_text get_text (unsigned /*range_idx*/) const FINAL OVERRIDE
label_text get_text (unsigned /*range_idx*/) const final override
{
return label_text::borrow (m_text);
}
@ -159,7 +159,7 @@ class range_label_for_type_mismatch : public range_label
{
}
label_text get_text (unsigned range_idx) const OVERRIDE;
label_text get_text (unsigned range_idx) const override;
protected:
tree m_labelled_type;
@ -178,7 +178,7 @@ class maybe_range_label_for_tree_type_mismatch : public range_label
{
}
label_text get_text (unsigned range_idx) const FINAL OVERRIDE;
label_text get_text (unsigned range_idx) const final override;
private:
tree m_expr;

View File

@ -761,7 +761,7 @@ public:
checker (checker) { }
~check_array_bounds_dom_walker () {}
edge before_dom_children (basic_block) FINAL OVERRIDE;
edge before_dom_children (basic_block) final override;
private:
array_bounds_checker *checker;

View File

@ -258,7 +258,7 @@ private:
public:
lv_dom_walker (loop_versioning &);
edge before_dom_children (basic_block) FINAL OVERRIDE;
edge before_dom_children (basic_block) final override;
private:
/* The parent pass. */
@ -271,7 +271,7 @@ private:
{
public:
name_prop (loop_info &li) : m_li (li) {}
tree value_of_expr (tree name, gimple *) FINAL OVERRIDE;
tree value_of_expr (tree name, gimple *) final override;
private:
/* Information about the versioning we've performed on the loop. */

View File

@ -77,9 +77,9 @@ class sbr_vector : public ssa_block_ranges
public:
sbr_vector (tree t, irange_allocator *allocator);
virtual bool set_bb_range (const_basic_block bb, const irange &r) OVERRIDE;
virtual bool get_bb_range (irange &r, const_basic_block bb) OVERRIDE;
virtual bool bb_range_p (const_basic_block bb) OVERRIDE;
virtual bool set_bb_range (const_basic_block bb, const irange &r) override;
virtual bool get_bb_range (irange &r, const_basic_block bb) override;
virtual bool bb_range_p (const_basic_block bb) override;
protected:
irange **m_tab; // Non growing vector.
int m_tab_size;
@ -192,9 +192,9 @@ class sbr_sparse_bitmap : public ssa_block_ranges
{
public:
sbr_sparse_bitmap (tree t, irange_allocator *allocator, bitmap_obstack *bm);
virtual bool set_bb_range (const_basic_block bb, const irange &r) OVERRIDE;
virtual bool get_bb_range (irange &r, const_basic_block bb) OVERRIDE;
virtual bool bb_range_p (const_basic_block bb) OVERRIDE;
virtual bool set_bb_range (const_basic_block bb, const irange &r) override;
virtual bool get_bb_range (irange &r, const_basic_block bb) override;
virtual bool bb_range_p (const_basic_block bb) override;
private:
void bitmap_set_quad (bitmap head, int quad, int quad_value);
int bitmap_get_quad (const_bitmap head, int quad);

View File

@ -92,7 +92,7 @@ public:
side_effect_manager m_exit;
void dump_bb (FILE *f, basic_block bb);
virtual void dump (FILE *f) OVERRIDE;
virtual void dump (FILE *f) override;
private:
ssa_global_cache m_globals;
block_range_cache m_on_entry;

View File

@ -109,8 +109,8 @@ class fur_edge : public fur_source
{
public:
fur_edge (edge e, range_query *q = NULL);
virtual bool get_operand (irange &r, tree expr) OVERRIDE;
virtual bool get_phi_operand (irange &r, tree expr, edge e) OVERRIDE;
virtual bool get_operand (irange &r, tree expr) override;
virtual bool get_phi_operand (irange &r, tree expr, edge e) override;
private:
edge m_edge;
};
@ -217,8 +217,8 @@ public:
fur_list (irange &r1);
fur_list (irange &r1, irange &r2);
fur_list (unsigned num, irange *list);
virtual bool get_operand (irange &r, tree expr) OVERRIDE;
virtual bool get_phi_operand (irange &r, tree expr, edge e) OVERRIDE;
virtual bool get_operand (irange &r, tree expr) override;
virtual bool get_phi_operand (irange &r, tree expr, edge e) override;
private:
int_range_max m_local[2];
irange *m_list;

View File

@ -143,9 +143,9 @@ class fur_stmt : public fur_source
{
public:
fur_stmt (gimple *s, range_query *q = NULL);
virtual bool get_operand (irange &r, tree expr) OVERRIDE;
virtual bool get_phi_operand (irange &r, tree expr, edge e) OVERRIDE;
virtual relation_kind query_relation (tree op1, tree op2) OVERRIDE;
virtual bool get_operand (irange &r, tree expr) override;
virtual bool get_phi_operand (irange &r, tree expr, edge e) override;
virtual relation_kind query_relation (tree op1, tree op2) override;
private:
gimple *m_stmt;
};
@ -158,9 +158,9 @@ class fur_depend : public fur_stmt
public:
fur_depend (gimple *s, gori_compute *gori, range_query *q = NULL);
virtual void register_relation (gimple *stmt, relation_kind k, tree op1,
tree op2) OVERRIDE;
tree op2) override;
virtual void register_relation (edge e, relation_kind k, tree op1,
tree op2) OVERRIDE;
tree op2) override;
protected:
relation_oracle *m_oracle;
};

View File

@ -42,7 +42,7 @@ public:
ASSERT_TRUE (r == expect);
}
virtual bool range_of_expr (irange &r, tree expr, gimple * = NULL) OVERRIDE
virtual bool range_of_expr (irange &r, tree expr, gimple * = NULL) override
{
if (expr == op0)
{

View File

@ -48,14 +48,14 @@ class gimple_ranger : public range_query
public:
gimple_ranger (bool use_imm_uses = true);
~gimple_ranger ();
virtual bool range_of_stmt (irange &r, gimple *, tree name = NULL) OVERRIDE;
virtual bool range_of_expr (irange &r, tree name, gimple * = NULL) OVERRIDE;
virtual bool range_on_edge (irange &r, edge e, tree name) OVERRIDE;
virtual bool range_of_stmt (irange &r, gimple *, tree name = NULL) override;
virtual bool range_of_expr (irange &r, tree name, gimple * = NULL) override;
virtual bool range_on_edge (irange &r, edge e, tree name) override;
void range_on_entry (irange &r, basic_block bb, tree name);
void range_on_exit (irange &r, basic_block bb, tree name);
void export_global_ranges ();
inline gori_compute &gori () { return m_cache.m_gori; }
virtual void dump (FILE *f) OVERRIDE;
virtual void dump (FILE *f) override;
void debug ();
void dump_bb (FILE *f, basic_block bb);
auto_edge_flag non_executable_edge_flag;

View File

@ -68,19 +68,19 @@ public:
}
}
tree value_of_expr (tree name, gimple *stmt) OVERRIDE
tree value_of_expr (tree name, gimple *stmt) override
{
return m_range_analyzer.value_of_expr (name, stmt);
}
void pre_fold_bb (basic_block bb) OVERRIDE
void pre_fold_bb (basic_block bb) override
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "evrp visiting BB%d\n", bb->index);
m_range_analyzer.enter (bb);
}
void pre_fold_stmt (gimple *stmt) OVERRIDE
void pre_fold_stmt (gimple *stmt) override
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
@ -90,17 +90,17 @@ public:
m_range_analyzer.record_ranges_from_stmt (stmt, false);
}
bool fold_stmt (gimple_stmt_iterator *gsi) OVERRIDE
bool fold_stmt (gimple_stmt_iterator *gsi) override
{
return simplifier.simplify (gsi);
}
void post_fold_bb (basic_block bb) OVERRIDE
void post_fold_bb (basic_block bb) override
{
m_range_analyzer.leave (bb);
}
void post_new_stmt (gimple *stmt) OVERRIDE
void post_new_stmt (gimple *stmt) override
{
m_range_analyzer.set_defs_to_varying (stmt);
}
@ -157,7 +157,7 @@ public:
delete m_pta;
}
bool fold_stmt (gimple_stmt_iterator *gsi) OVERRIDE
bool fold_stmt (gimple_stmt_iterator *gsi) override
{
simplifier.set_range_query (first, first_exec_flag);
if (simplifier.simplify (gsi))
@ -173,27 +173,27 @@ public:
return false;
}
void pre_fold_stmt (gimple *stmt) OVERRIDE
void pre_fold_stmt (gimple *stmt) override
{
evrp_folder::pre_fold_stmt (stmt);
m_pta->visit_stmt (stmt);
}
void pre_fold_bb (basic_block bb) OVERRIDE
void pre_fold_bb (basic_block bb) override
{
evrp_folder::pre_fold_bb (bb);
m_pta->enter (bb);
}
void post_fold_bb (basic_block bb) OVERRIDE
void post_fold_bb (basic_block bb) override
{
evrp_folder::post_fold_bb (bb);
m_pta->leave (bb);
}
tree value_of_expr (tree name, gimple *) OVERRIDE;
tree value_on_edge (edge, tree name) OVERRIDE;
tree value_of_stmt (gimple *, tree name) OVERRIDE;
tree value_of_expr (tree name, gimple *) override;
tree value_on_edge (edge, tree name) override;
tree value_of_stmt (gimple *, tree name) override;
private:
DISABLE_COPY_AND_ASSIGN (hybrid_folder);

View File

@ -2310,7 +2310,7 @@ class ebcdic_execution_charset : public lexer_test_options
s_singleton = NULL;
}
void apply (lexer_test &test) FINAL OVERRIDE
void apply (lexer_test &test) final override
{
cpp_options *cpp_opts = cpp_get_options (test.m_parser);
cpp_opts->narrow_charset = "IBM1047";
@ -2375,7 +2375,7 @@ class lexer_diagnostic_sink : public lexer_test_options
free (str);
}
void apply (lexer_test &test) FINAL OVERRIDE
void apply (lexer_test &test) final override
{
cpp_callbacks *callbacks = cpp_get_callbacks (test.m_parser);
callbacks->diagnostic = on_diagnostic;

View File

@ -378,7 +378,7 @@ class compile_to_memory : public context
{
public:
compile_to_memory (recording::context *ctxt);
void postprocess (const char *ctxt_progname) FINAL OVERRIDE;
void postprocess (const char *ctxt_progname) final override;
result *get_result_obj () const { return m_result; }
@ -392,7 +392,7 @@ class compile_to_file : public context
compile_to_file (recording::context *ctxt,
enum gcc_jit_output_kind output_kind,
const char *output_path);
void postprocess (const char *ctxt_progname) FINAL OVERRIDE;
void postprocess (const char *ctxt_progname) final override;
private:
void
@ -483,7 +483,7 @@ public:
function(context *ctxt, tree fndecl, enum gcc_jit_function_kind kind);
void gt_ggc_mx ();
void finalizer () FINAL OVERRIDE;
void finalizer () final override;
tree get_return_type_as_tree () const;
@ -562,7 +562,7 @@ public:
block (function *func,
const char *name);
void finalizer () FINAL OVERRIDE;
void finalizer () final override;
tree as_label_decl () const { return m_label_decl; }
@ -750,7 +750,7 @@ class source_file : public wrapper
{
public:
source_file (tree filename);
void finalizer () FINAL OVERRIDE;
void finalizer () final override;
source_line *
get_source_line (int line_num);
@ -771,7 +771,7 @@ class source_line : public wrapper
{
public:
source_line (source_file *file, int line_num);
void finalizer () FINAL OVERRIDE;
void finalizer () final override;
location *
get_location (recording::location *rloc, int column_num);

View File

@ -3741,7 +3741,7 @@ class rvalue_usage_validator : public recording::rvalue_visitor
recording::statement *stmt);
void
visit (recording::rvalue *rvalue) FINAL OVERRIDE;
visit (recording::rvalue *rvalue) final override;
private:
const char *m_api_funcname;

File diff suppressed because it is too large Load Diff

View File

@ -90,8 +90,8 @@ class object : public value
public:
~object ();
enum kind get_kind () const FINAL OVERRIDE { return JSON_OBJECT; }
void print (pretty_printer *pp) const FINAL OVERRIDE;
enum kind get_kind () const final override { return JSON_OBJECT; }
void print (pretty_printer *pp) const final override;
void set (const char *key, value *v);
value *get (const char *key) const;
@ -109,8 +109,8 @@ class array : public value
public:
~array ();
enum kind get_kind () const FINAL OVERRIDE { return JSON_ARRAY; }
void print (pretty_printer *pp) const FINAL OVERRIDE;
enum kind get_kind () const final override { return JSON_ARRAY; }
void print (pretty_printer *pp) const final override;
void append (value *v);
@ -125,8 +125,8 @@ class float_number : public value
public:
float_number (double value) : m_value (value) {}
enum kind get_kind () const FINAL OVERRIDE { return JSON_FLOAT; }
void print (pretty_printer *pp) const FINAL OVERRIDE;
enum kind get_kind () const final override { return JSON_FLOAT; }
void print (pretty_printer *pp) const final override;
double get () const { return m_value; }
@ -141,8 +141,8 @@ class integer_number : public value
public:
integer_number (long value) : m_value (value) {}
enum kind get_kind () const FINAL OVERRIDE { return JSON_INTEGER; }
void print (pretty_printer *pp) const FINAL OVERRIDE;
enum kind get_kind () const final override { return JSON_INTEGER; }
void print (pretty_printer *pp) const final override;
long get () const { return m_value; }
@ -159,8 +159,8 @@ class string : public value
string (const char *utf8);
~string () { free (m_utf8); }
enum kind get_kind () const FINAL OVERRIDE { return JSON_STRING; }
void print (pretty_printer *pp) const FINAL OVERRIDE;
enum kind get_kind () const final override { return JSON_STRING; }
void print (pretty_printer *pp) const final override;
const char *get_string () const { return m_utf8; }
@ -179,8 +179,8 @@ class literal : public value
/* Construct literal for a boolean value. */
literal (bool value): m_kind (value ? JSON_TRUE : JSON_FALSE) {}
enum kind get_kind () const FINAL OVERRIDE { return m_kind; }
void print (pretty_printer *pp) const FINAL OVERRIDE;
enum kind get_kind () const final override { return m_kind; }
void print (pretty_printer *pp) const final override;
private:
enum kind m_kind;

View File

@ -77,13 +77,13 @@ class function_reader : public rtx_reader
~function_reader ();
/* Overridden vfuncs of class md_reader. */
void handle_unknown_directive (file_location, const char *) FINAL OVERRIDE;
void handle_unknown_directive (file_location, const char *) final override;
/* Overridden vfuncs of class rtx_reader. */
rtx read_rtx_operand (rtx x, int idx) FINAL OVERRIDE;
void handle_any_trailing_information (rtx x) FINAL OVERRIDE;
rtx postprocess (rtx) FINAL OVERRIDE;
const char *finalize_string (char *stringbuf) FINAL OVERRIDE;
rtx read_rtx_operand (rtx x, int idx) final override;
void handle_any_trailing_information (rtx x) final override;
rtx postprocess (rtx) final override;
const char *finalize_string (char *stringbuf) final override;
rtx_insn **get_insn_by_uid (int uid);
tree parse_mem_expr (const char *desc);

View File

@ -64,8 +64,8 @@ typedef int complex_lattice_t;
class complex_propagate : public ssa_propagation_engine
{
enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) FINAL OVERRIDE;
enum ssa_prop_result visit_phi (gphi *) FINAL OVERRIDE;
enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) final override;
enum ssa_prop_result visit_phi (gphi *) final override;
};
static vec<complex_lattice_t> complex_lattice_values;

View File

@ -51,7 +51,7 @@ class path_label : public range_label
: m_path (path), m_start_idx (start_idx)
{}
label_text get_text (unsigned range_idx) const FINAL OVERRIDE
label_text get_text (unsigned range_idx) const final override
{
unsigned event_idx = m_start_idx + range_idx;
const diagnostic_event &event = m_path->get_event (event_idx);

View File

@ -180,8 +180,8 @@ public:
class ccp_propagate : public ssa_propagation_engine
{
public:
enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) FINAL OVERRIDE;
enum ssa_prop_result visit_phi (gphi *) FINAL OVERRIDE;
enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) final override;
enum ssa_prop_result visit_phi (gphi *) final override;
};
/* Array of propagated constant values. After propagation,
@ -947,8 +947,8 @@ do_dbg_cnt (void)
class ccp_folder : public substitute_and_fold_engine
{
public:
tree value_of_expr (tree, gimple *) FINAL OVERRIDE;
bool fold_stmt (gimple_stmt_iterator *) FINAL OVERRIDE;
tree value_of_expr (tree, gimple *) final override;
bool fold_stmt (gimple_stmt_iterator *) final override;
};
/* This method just wraps GET_CONSTANT_VALUE for now. Over time

View File

@ -71,8 +71,8 @@ struct prop_value_t {
class copy_prop : public ssa_propagation_engine
{
public:
enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) FINAL OVERRIDE;
enum ssa_prop_result visit_phi (gphi *) FINAL OVERRIDE;
enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) final override;
enum ssa_prop_result visit_phi (gphi *) final override;
};
static prop_value_t *copy_of;
@ -492,7 +492,7 @@ init_copy_prop (void)
class copy_folder : public substitute_and_fold_engine
{
public:
tree value_of_expr (tree name, gimple *) FINAL OVERRIDE;
tree value_of_expr (tree name, gimple *) final override;
};
/* Callback for substitute_and_fold to get at the final copy-of values. */

View File

@ -3795,8 +3795,8 @@ public:
void finalize ();
private:
enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) FINAL OVERRIDE;
enum ssa_prop_result visit_phi (gphi *) FINAL OVERRIDE;
enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) final override;
enum ssa_prop_result visit_phi (gphi *) final override;
struct function *fun;
vr_values *m_vr_values;
@ -4036,11 +4036,11 @@ class vrp_folder : public substitute_and_fold_engine
void simplify_casted_conds (function *fun);
private:
tree value_of_expr (tree name, gimple *stmt) OVERRIDE
tree value_of_expr (tree name, gimple *stmt) override
{
return m_vr_values->value_of_expr (name, stmt);
}
bool fold_stmt (gimple_stmt_iterator *) FINAL OVERRIDE;
bool fold_stmt (gimple_stmt_iterator *) final override;
bool fold_predicate_in (gimple_stmt_iterator *);
vr_values *m_vr_values;
@ -4269,7 +4269,7 @@ public:
delete m_pta;
}
tree value_of_expr (tree name, gimple *s = NULL) OVERRIDE
tree value_of_expr (tree name, gimple *s = NULL) override
{
// Shortcircuit subst_and_fold callbacks for abnormal ssa_names.
if (TREE_CODE (name) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name))
@ -4280,7 +4280,7 @@ public:
return ret;
}
tree value_on_edge (edge e, tree name) OVERRIDE
tree value_on_edge (edge e, tree name) override
{
// Shortcircuit subst_and_fold callbacks for abnormal ssa_names.
if (TREE_CODE (name) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name))
@ -4291,7 +4291,7 @@ public:
return ret;
}
tree value_of_stmt (gimple *s, tree name = NULL) OVERRIDE
tree value_of_stmt (gimple *s, tree name = NULL) override
{
// Shortcircuit subst_and_fold callbacks for abnormal ssa_names.
if (TREE_CODE (name) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name))
@ -4299,7 +4299,7 @@ public:
return m_ranger->value_of_stmt (s, name);
}
void pre_fold_bb (basic_block bb) OVERRIDE
void pre_fold_bb (basic_block bb) override
{
m_pta->enter (bb);
for (gphi_iterator gsi = gsi_start_phis (bb); !gsi_end_p (gsi);
@ -4307,17 +4307,17 @@ public:
m_ranger->register_side_effects (gsi.phi ());
}
void post_fold_bb (basic_block bb) OVERRIDE
void post_fold_bb (basic_block bb) override
{
m_pta->leave (bb);
}
void pre_fold_stmt (gimple *stmt) OVERRIDE
void pre_fold_stmt (gimple *stmt) override
{
m_pta->visit_stmt (stmt);
}
bool fold_stmt (gimple_stmt_iterator *gsi) OVERRIDE
bool fold_stmt (gimple_stmt_iterator *gsi) override
{
bool ret = m_simplifier.simplify (gsi);
if (!ret)

View File

@ -79,9 +79,9 @@ public:
range_query ();
virtual ~range_query ();
virtual tree value_of_expr (tree expr, gimple * = NULL) OVERRIDE;
virtual tree value_on_edge (edge, tree expr) OVERRIDE;
virtual tree value_of_stmt (gimple *, tree name = NULL) OVERRIDE;
virtual tree value_of_expr (tree expr, gimple * = NULL) override;
virtual tree value_on_edge (edge, tree expr) override;
virtual tree value_of_stmt (gimple *, tree name = NULL) override;
// These are the range equivalents of the value_* methods. Instead
// of returning a singleton, they calculate a range and return it in
@ -123,7 +123,7 @@ private:
class global_range_query : public range_query
{
public:
bool range_of_expr (irange &r, tree expr, gimple * = NULL) OVERRIDE;
bool range_of_expr (irange &r, tree expr, gimple * = NULL) override;
};
extern global_range_query global_ranges;

View File

@ -109,12 +109,12 @@ class vr_values : public range_query
vr_values (void);
~vr_values (void);
virtual bool range_of_expr (irange &r, tree expr, gimple *stmt) OVERRIDE;
virtual tree value_of_expr (tree, gimple * = NULL) OVERRIDE;
virtual tree value_on_edge (edge, tree) OVERRIDE;
virtual tree value_of_stmt (gimple *, tree = NULL_TREE) OVERRIDE;
virtual bool range_of_expr (irange &r, tree expr, gimple *stmt) override;
virtual tree value_of_expr (tree, gimple * = NULL) override;
virtual tree value_on_edge (edge, tree) override;
virtual tree value_of_stmt (gimple *, tree = NULL_TREE) override;
virtual const value_range_equiv *get_value_range (const_tree,
gimple * = NULL) OVERRIDE;
gimple * = NULL) override;
void set_vr_value (tree, value_range_equiv *);
value_range_equiv *swap_vr_value (tree, value_range_equiv *);
@ -124,7 +124,7 @@ class vr_values : public range_query
tree op_with_constant_singleton_value_range (tree);
void adjust_range_with_scev (value_range_equiv *, class loop *,
gimple *, tree);
virtual void dump (FILE *) OVERRIDE;
virtual void dump (FILE *) override;
void extract_range_for_var_from_comparison_expr (tree, enum tree_code,
tree, tree,

View File

@ -1523,7 +1523,7 @@ class unpaired_bidi_rich_location : public rich_location
class custom_range_label : public range_label
{
public:
label_text get_text (unsigned range_idx) const FINAL OVERRIDE
label_text get_text (unsigned range_idx) const final override
{
/* range 0 is the primary location; each subsequent range i + 1
is for bidi::vec[i]. */