From ff171cb13df671a2a0647a68da0fdc1f9a78b8c9 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 20 May 2022 10:05:54 -0400 Subject: 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 --- gcc/analyzer/analyzer-pass.cc | 4 +- gcc/analyzer/call-info.h | 8 +- gcc/analyzer/checker-path.h | 52 +- gcc/analyzer/constraint-manager.cc | 4 +- gcc/analyzer/diagnostic-manager.cc | 36 +- gcc/analyzer/engine.cc | 90 ++-- gcc/analyzer/exploded-graph.h | 52 +- gcc/analyzer/feasible-graph.h | 6 +- gcc/analyzer/pending-diagnostic.h | 4 +- gcc/analyzer/region-model-impl-calls.cc | 14 +- gcc/analyzer/region-model.cc | 54 +- gcc/analyzer/region-model.h | 84 +-- gcc/analyzer/region.h | 142 ++--- gcc/analyzer/sm-file.cc | 36 +- gcc/analyzer/sm-malloc.cc | 130 ++--- gcc/analyzer/sm-pattern-test.cc | 14 +- gcc/analyzer/sm-sensitive.cc | 20 +- gcc/analyzer/sm-signal.cc | 24 +- gcc/analyzer/sm-taint.cc | 60 +-- gcc/analyzer/state-purge.h | 4 +- gcc/analyzer/store.cc | 2 +- gcc/analyzer/store.h | 12 +- gcc/analyzer/supergraph.h | 26 +- gcc/analyzer/svalue.h | 178 +++---- gcc/analyzer/trimmed-graph.h | 4 +- gcc/analyzer/varargs.cc | 54 +- gcc/c-family/c-format.cc | 2 +- gcc/c-family/c-pretty-print.h | 2 +- gcc/config/aarch64/aarch64-sve-builtins-base.cc | 260 ++++----- .../aarch64/aarch64-sve-builtins-functions.h | 48 +- gcc/config/aarch64/aarch64-sve-builtins-shapes.cc | 416 +++++++-------- gcc/config/aarch64/aarch64-sve-builtins-sve2.cc | 44 +- gcc/cp/cxx-pretty-print.h | 2 +- gcc/cp/error.cc | 4 +- gcc/diagnostic-path.h | 12 +- gcc/digraph.cc | 4 +- gcc/gcc-rich-location.h | 6 +- gcc/gimple-array-bounds.cc | 2 +- gcc/gimple-loop-versioning.cc | 4 +- gcc/gimple-range-cache.cc | 12 +- gcc/gimple-range-cache.h | 2 +- gcc/gimple-range-fold.cc | 8 +- gcc/gimple-range-fold.h | 10 +- gcc/gimple-range-tests.cc | 2 +- gcc/gimple-range.h | 8 +- gcc/gimple-ssa-evrp.cc | 26 +- gcc/input.cc | 4 +- gcc/jit/jit-playback.h | 12 +- gcc/jit/jit-recording.cc | 2 +- gcc/jit/jit-recording.h | 586 ++++++++++----------- gcc/json.h | 24 +- gcc/read-rtl-function.cc | 10 +- gcc/tree-complex.cc | 4 +- gcc/tree-diagnostic-path.cc | 2 +- gcc/tree-ssa-ccp.cc | 8 +- gcc/tree-ssa-copy.cc | 6 +- gcc/tree-vrp.cc | 22 +- gcc/value-query.h | 8 +- gcc/vr-values.h | 12 +- libcpp/lex.cc | 2 +- 60 files changed, 1345 insertions(+), 1345 deletions(-) diff --git a/gcc/analyzer/analyzer-pass.cc b/gcc/analyzer/analyzer-pass.cc index 0bf131b..f6cef58 100644 --- a/gcc/analyzer/analyzer-pass.cc +++ b/gcc/analyzer/analyzer-pass.cc @@ -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. */ diff --git a/gcc/analyzer/call-info.h b/gcc/analyzer/call-info.h index bdcfff7..4bb7dd7 100644 --- a/gcc/analyzer/call-info.h +++ b/gcc/analyzer/call-info.h @@ -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) {} diff --git a/gcc/analyzer/checker-path.h b/gcc/analyzer/checker-path.h index 545d7db..fd274e5 100644 --- a/gcc/analyzer/checker-path.h +++ b/gcc/analyzer/checker-path.h @@ -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]; } diff --git a/gcc/analyzer/constraint-manager.cc b/gcc/analyzer/constraint-manager.cc index 9c8c604..02e8ce9 100644 --- a/gcc/analyzer/constraint-manager.cc +++ b/gcc/analyzer/constraint-manager.cc @@ -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) { diff --git a/gcc/analyzer/diagnostic-manager.cc b/gcc/analyzer/diagnostic-manager.cc index e8a828d..e90cd00 100644 --- a/gcc/analyzer/diagnostic-manager.cc +++ b/gcc/analyzer/diagnostic-manager.cc @@ -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 (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; } diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index 1638662..c59374b 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -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 (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 (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; } diff --git a/gcc/analyzer/exploded-graph.h b/gcc/analyzer/exploded-graph.h index 2dcdcc5..101f4f9 100644 --- a/gcc/analyzer/exploded-graph.h +++ b/gcc/analyzer/exploded-graph.h @@ -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 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 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 { diff --git a/gcc/analyzer/feasible-graph.h b/gcc/analyzer/feasible-graph.h index f1868af..2530119 100644 --- a/gcc/analyzer/feasible-graph.h +++ b/gcc/analyzer/feasible-graph.h @@ -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 { 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; } diff --git a/gcc/analyzer/pending-diagnostic.h b/gcc/analyzer/pending-diagnostic.h index 17db9fe..a273f89 100644 --- a/gcc/analyzer/pending-diagnostic.h +++ b/gcc/analyzer/pending-diagnostic.h @@ -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; diff --git a/gcc/analyzer/region-model-impl-calls.cc b/gcc/analyzer/region-model-impl-calls.cc index a76caf7..55d6fa7 100644 --- a/gcc/analyzer/region-model-impl-calls.cc +++ b/gcc/analyzer/region-model-impl-calls.cc @@ -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 ()) diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc index de221c3..6f6a061 100644 --- a/gcc/analyzer/region-model.cc +++ b/gcc/analyzer/region-model.cc @@ -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 { 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"); } diff --git a/gcc/analyzer/region-model.h b/gcc/analyzer/region-model.h index 4e5cb46..1bfa56a 100644 --- a/gcc/analyzer/region-model.h +++ b/gcc/analyzer/region-model.h @@ -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))); diff --git a/gcc/analyzer/region.h b/gcc/analyzer/region.h index d32110b..60d8149 100644 --- a/gcc/analyzer/region.h +++ b/gcc/analyzer/region.h @@ -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 diff --git a/gcc/analyzer/sm-file.cc b/gcc/analyzer/sm-file.cc index 3a45e62..e9b5b8b 100644 --- a/gcc/analyzer/sm-file.cc +++ b/gcc/analyzer/sm-file.cc @@ -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 % 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 ()) { diff --git a/gcc/analyzer/sm-malloc.cc b/gcc/analyzer/sm-malloc.cc index 20c1677..abdce6b 100644 --- a/gcc/analyzer/sm-malloc.cc +++ b/gcc/analyzer/sm-malloc.cc @@ -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 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); diff --git a/gcc/analyzer/sm-pattern-test.cc b/gcc/analyzer/sm-pattern-test.cc index 68b976a..9b2ad68 100644 --- a/gcc/analyzer/sm-pattern-test.cc +++ b/gcc/analyzer/sm-pattern-test.cc @@ -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 @@ -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%>", diff --git a/gcc/analyzer/sm-sensitive.cc b/gcc/analyzer/sm-sensitive.cc index f40f3e8..20809dd 100644 --- a/gcc/analyzer/sm-sensitive.cc +++ b/gcc/analyzer/sm-sensitive.cc @@ -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" diff --git a/gcc/analyzer/sm-signal.cc b/gcc/analyzer/sm-signal.cc index 9b0213e..1f48a09 100644 --- a/gcc/analyzer/sm-signal.cc +++ b/gcc/analyzer/sm-signal.cc @@ -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) diff --git a/gcc/analyzer/sm-taint.cc b/gcc/analyzer/sm-taint.cc index 17669ae..3aaa69a 100644 --- a/gcc/analyzer/sm-taint.cc +++ b/gcc/analyzer/sm-taint.cc @@ -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) diff --git a/gcc/analyzer/state-purge.h b/gcc/analyzer/state-purge.h index 3c51b48..53fd4a2 100644 --- a/gcc/analyzer/state-purge.h +++ b/gcc/analyzer/state-purge.h @@ -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, diff --git a/gcc/analyzer/store.cc b/gcc/analyzer/store.cc index f5f8fe0..1b7c818 100644 --- a/gcc/analyzer/store.cc +++ b/gcc/analyzer/store.cc @@ -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); } diff --git a/gcc/analyzer/store.h b/gcc/analyzer/store.h index 17485b7..368b299 100644 --- a/gcc/analyzer/store.h +++ b/gcc/analyzer/store.h @@ -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; } diff --git a/gcc/analyzer/supergraph.h b/gcc/analyzer/supergraph.h index 235de79..cc53fcb 100644 --- a/gcc/analyzer/supergraph.h +++ b/gcc/analyzer/supergraph.h @@ -245,7 +245,7 @@ class supernode : public dnode 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 { diff --git a/gcc/analyzer/svalue.h b/gcc/analyzer/svalue.h index 29ea2ee..f4cab0d 100644 --- a/gcc/analyzer/svalue.h +++ b/gcc/analyzer/svalue.h @@ -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; } diff --git a/gcc/analyzer/trimmed-graph.h b/gcc/analyzer/trimmed-graph.h index 0b78843..89f36a5 100644 --- a/gcc/analyzer/trimmed-graph.h +++ b/gcc/analyzer/trimmed-graph.h @@ -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 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; diff --git a/gcc/analyzer/varargs.cc b/gcc/analyzer/varargs.cc index de77fe5d3..3f15ada 100644 --- a/gcc/analyzer/varargs.cc +++ b/gcc/analyzer/varargs.cc @@ -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 ("% 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 ()); diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc index 25b1c1d..4559ca3 100644 --- a/gcc/c-family/c-format.cc +++ b/gcc/c-family/c-format.cc @@ -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) diff --git a/gcc/c-family/c-pretty-print.h b/gcc/c-family/c-pretty-print.h index ba7624d..be86bed 100644 --- a/gcc/c-family/c-pretty-print.h +++ b/gcc/c-family/c-pretty-print.h @@ -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 *); diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc index c24c054..bee4109 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc @@ -148,7 +148,7 @@ class svabd_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* The integer operations are represented as the subtraction of the minimum from the maximum, with the signedness of the instruction @@ -179,7 +179,7 @@ public: CONSTEXPR svac_impl (int unspec) : m_unspec (unspec) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { e.add_ptrue_hint (0, e.gp_mode (0)); insn_code icode = code_for_aarch64_pred_fac (m_unspec, e.vector_mode (0)); @@ -194,7 +194,7 @@ class svadda_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* Put the predicate last, as required by mask_fold_left_plus_optab. */ e.rotate_inputs_left (0, 3); @@ -211,7 +211,7 @@ public: CONSTEXPR svadr_bhwd_impl (unsigned int shift) : m_shift (shift) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode mode = GET_MODE (e.args[0]); if (m_shift == 0) @@ -231,7 +231,7 @@ class svbic_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* Convert svbic of a constant into svand of its inverse. */ if (CONST_INT_P (e.args[2])) @@ -261,7 +261,7 @@ public: CONSTEXPR svbrk_binary_impl (int unspec) : m_unspec (unspec) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { return e.use_exact_insn (code_for_aarch64_brk (m_unspec)); } @@ -277,7 +277,7 @@ public: CONSTEXPR svbrk_unary_impl (int unspec) : m_unspec (unspec) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { return e.use_cond_insn (code_for_aarch64_brk (m_unspec)); } @@ -290,7 +290,7 @@ class svcadd_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 ()); @@ -311,7 +311,7 @@ public: CONSTEXPR svclast_impl (int unspec) : m_unspec (unspec) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* Match the fold_extract_optab order. */ std::swap (e.args[0], e.args[1]); @@ -332,7 +332,7 @@ class svcmla_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 ()); @@ -355,7 +355,7 @@ class svcmla_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 ()); @@ -384,7 +384,7 @@ public: : m_code (code), m_unspec_for_fp (unspec_for_fp) {} gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree pg = gimple_call_arg (f.call, 0); tree rhs1 = gimple_call_arg (f.call, 1); @@ -406,7 +406,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode mode = e.vector_mode (0); @@ -442,7 +442,7 @@ public: m_unspec_for_uint (unspec_for_uint) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode mode = e.vector_mode (0); bool unsigned_p = e.type_suffix (0).unsigned_p; @@ -480,7 +480,7 @@ class svcmpuo_impl : public quiet { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { e.add_ptrue_hint (0, e.gp_mode (0)); return e.use_exact_insn (code_for_aarch64_pred_fcmuo (e.vector_mode (0))); @@ -491,7 +491,7 @@ class svcnot_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) @@ -514,7 +514,7 @@ public: CONSTEXPR svcnt_bhwd_impl (machine_mode ref_mode) : m_ref_mode (ref_mode) {} gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree count = build_int_cstu (TREE_TYPE (f.lhs), GET_MODE_NUNITS (m_ref_mode)); @@ -522,7 +522,7 @@ public: } rtx - expand (function_expander &) const OVERRIDE + expand (function_expander &) const override { return gen_int_mode (GET_MODE_NUNITS (m_ref_mode), DImode); } @@ -539,7 +539,7 @@ public: : svcnt_bhwd_impl (ref_mode) {} gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree pattern_arg = gimple_call_arg (f.call, 0); aarch64_svpattern pattern = (aarch64_svpattern) tree_to_shwi (pattern_arg); @@ -562,7 +562,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { unsigned int elements_per_vq = 128 / GET_MODE_UNIT_BITSIZE (m_ref_mode); e.args.quick_push (gen_int_mode (elements_per_vq, DImode)); @@ -575,7 +575,7 @@ class svcntp_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); e.add_ptrue_hint (0, mode); @@ -591,7 +591,7 @@ public: : quiet (vectors_per_tuple) {} gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { unsigned int nargs = gimple_call_num_args (f.call); tree lhs_type = TREE_TYPE (f.lhs); @@ -621,7 +621,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { rtx lhs_tuple = e.get_nonoverlapping_reg_target (); @@ -643,7 +643,7 @@ class svcvt_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode mode0 = e.vector_mode (0); machine_mode mode1 = e.vector_mode (1); @@ -706,7 +706,7 @@ class svdot_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* In the optab, the multiplication operands come before the accumulator operand. The optab is keyed off the multiplication mode. */ @@ -729,7 +729,7 @@ public: unspec_for_float) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* Use the same ordering as the dot_prod_optab, with the accumulator last. */ @@ -744,7 +744,7 @@ class svdup_impl : public quiet { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree vec_type = TREE_TYPE (f.lhs); tree rhs = gimple_call_arg (f.call, f.pred == PRED_none ? 0 : 1); @@ -784,7 +784,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { if (e.pred == PRED_none || e.pred == PRED_x) /* There's no benefit to using predicated instructions for _x here. */ @@ -812,7 +812,7 @@ class svdup_lane_impl : public quiet { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* The native DUP lane has an index range of 64 bytes. */ machine_mode mode = e.vector_mode (0); @@ -829,7 +829,7 @@ class svdupq_impl : public quiet { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree vec_type = TREE_TYPE (f.lhs); unsigned int nargs = gimple_call_num_args (f.call); @@ -851,7 +851,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode mode = e.vector_mode (0); unsigned int elements_per_vq = e.args.length (); @@ -900,7 +900,7 @@ class svdupq_lane_impl : public quiet { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode mode = e.vector_mode (0); rtx index = e.args[1]; @@ -964,7 +964,7 @@ public: : m_from_mode (from_mode) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { if (e.type_suffix (0).unsigned_p) { @@ -1006,7 +1006,7 @@ public: : quiet (vectors_per_tuple) {} gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { /* Fold into a normal gimple component access. */ tree rhs_tuple = gimple_call_arg (f.call, 0); @@ -1020,7 +1020,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* Fold the access into a subreg rvalue. */ return simplify_gen_subreg (e.vector_mode (0), e.args[0], @@ -1033,7 +1033,7 @@ class svindex_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { return e.use_exact_insn (e.direct_optab_handler (vec_series_optab)); } @@ -1043,7 +1043,7 @@ class svinsr_impl : public quiet { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { gcall *new_call = gimple_build_call_internal (IFN_VEC_SHL_INSERT, 2, gimple_call_arg (f.call, 0), @@ -1053,7 +1053,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { insn_code icode = direct_optab_handler (vec_shl_insert_optab, e.vector_mode (0)); @@ -1068,7 +1068,7 @@ public: CONSTEXPR svlast_impl (int unspec) : m_unspec (unspec) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { return e.use_exact_insn (code_for_extract (m_unspec, e.vector_mode (0))); } @@ -1081,13 +1081,13 @@ class svld1_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; } gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree vectype = f.vector_type (0); @@ -1105,7 +1105,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { insn_code icode = convert_optab_handler (maskload_optab, e.vector_mode (0), e.gp_mode (0)); @@ -1121,7 +1121,7 @@ public: : extending_load (memory_type) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { insn_code icode = code_for_aarch64_load (UNSPEC_LD1_SVE, extend_rtx_code (), e.vector_mode (0), @@ -1134,13 +1134,13 @@ class svld1_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); /* Put the predicate last, as required by mask_gather_load_optab. */ @@ -1161,7 +1161,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); /* Put the predicate last, since the extending gathers use the same @@ -1180,13 +1180,13 @@ class load_replicate : public function_base { public: 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 &fi) const OVERRIDE + memory_scalar_type (const function_instance &fi) const override { return fi.scalar_type (0); } @@ -1196,13 +1196,13 @@ class svld1rq_impl : public load_replicate { public: machine_mode - memory_vector_mode (const function_instance &fi) const OVERRIDE + memory_vector_mode (const function_instance &fi) const override { return aarch64_vq_mode (GET_MODE_INNER (fi.vector_mode (0))).require (); } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { insn_code icode = code_for_aarch64_sve_ld1rq (e.vector_mode (0)); return e.use_contiguous_load_insn (icode); @@ -1213,13 +1213,13 @@ class svld1ro_impl : public load_replicate { public: machine_mode - memory_vector_mode (const function_instance &) const OVERRIDE + memory_vector_mode (const function_instance &) const override { return OImode; } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { insn_code icode = code_for_aarch64_sve_ld1ro (e.vector_mode (0)); return e.use_contiguous_load_insn (icode); @@ -1234,13 +1234,13 @@ public: : full_width_access (vectors_per_tuple) {} unsigned int - call_properties (const function_instance &) const OVERRIDE + call_properties (const function_instance &) const override { return CP_READ_MEMORY; } gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree tuple_type = TREE_TYPE (f.lhs); tree vectype = f.vector_type (0); @@ -1275,7 +1275,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode tuple_mode = TYPE_MODE (TREE_TYPE (e.call_expr)); insn_code icode = convert_optab_handler (vec_mask_load_lanes_optab, @@ -1288,13 +1288,13 @@ class svldff1_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 | CP_READ_FFR | CP_WRITE_FFR; } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* See the block comment in aarch64-sve.md for details about the FFR handling. */ @@ -1317,7 +1317,7 @@ public: : extending_load (memory_type) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* See the block comment in aarch64-sve.md for details about the FFR handling. */ @@ -1340,13 +1340,13 @@ class svldnt1_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 { insn_code icode = code_for_aarch64_ldnt1 (e.vector_mode (0)); return e.use_contiguous_load_insn (icode); @@ -1360,13 +1360,13 @@ public: CONSTEXPR svldxf1_impl (int unspec) : m_unspec (unspec) {} unsigned int - call_properties (const function_instance &) const OVERRIDE + call_properties (const function_instance &) const override { return CP_READ_MEMORY | CP_READ_FFR | CP_WRITE_FFR; } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* See the block comment in aarch64-sve.md for details about the FFR handling. */ @@ -1388,13 +1388,13 @@ public: : extending_load (memory_type), m_unspec (unspec) {} unsigned int - call_properties (const function_instance &) const OVERRIDE + call_properties (const function_instance &) const override { return CP_READ_MEMORY | CP_READ_FFR | CP_WRITE_FFR; } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* See the block comment in aarch64-sve.md for details about the FFR handling. */ @@ -1414,7 +1414,7 @@ class svlen_impl : public quiet { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { /* The argument only exists for its type. */ tree rhs_type = TREE_TYPE (gimple_call_arg (f.call, 0)); @@ -1424,7 +1424,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* The argument only exists for its type. */ return gen_int_mode (GET_MODE_NUNITS (e.vector_mode (0)), DImode); @@ -1435,7 +1435,7 @@ class svmad_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { return expand_mad (e); } @@ -1445,7 +1445,7 @@ class svmla_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* Put the accumulator at the end (argument 3), but keep it as the merge input for _m functions. */ @@ -1458,7 +1458,7 @@ class svmla_lane_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { if (e.type_suffix (0).integer_p) { @@ -1473,7 +1473,7 @@ class svmls_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* Put the accumulator at the end (argument 3), but keep it as the merge input for _m functions. */ @@ -1486,7 +1486,7 @@ class svmov_impl : public function_base { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { return gimple_build_assign (f.lhs, BIT_AND_EXPR, gimple_call_arg (f.call, 0), @@ -1494,7 +1494,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* The canonical form for the assembler alias "MOV Pa.B, Pb/Z, Pc.B" is "AND Pa.B, Pb/Z, Pc.B, Pc.B". */ @@ -1508,7 +1508,7 @@ class svmls_lane_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { if (e.type_suffix (0).integer_p) { @@ -1523,7 +1523,7 @@ class svmmla_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { insn_code icode; if (e.type_suffix (0).integer_p) @@ -1543,7 +1543,7 @@ class svmsb_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { return expand_msb (e); } @@ -1553,7 +1553,7 @@ class svnand_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { gcc_assert (e.pred == PRED_z); return e.use_exact_insn (CODE_FOR_aarch64_pred_nandvnx16bi_z); @@ -1564,7 +1564,7 @@ class svnor_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { gcc_assert (e.pred == PRED_z); return e.use_exact_insn (CODE_FOR_aarch64_pred_norvnx16bi_z); @@ -1577,7 +1577,7 @@ public: CONSTEXPR svnot_impl () : rtx_code_function (NOT, NOT, -1) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { if (e.type_suffix_ids[0] == TYPE_SUFFIX_b) { @@ -1595,7 +1595,7 @@ class svorn_impl : public function_base { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { gcc_assert (e.pred == PRED_z); return e.use_exact_insn (CODE_FOR_aarch64_pred_ornvnx16bi_z); @@ -1606,13 +1606,13 @@ class svpfalse_impl : public function_base { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { return f.fold_to_pfalse (); } rtx - expand (function_expander &) const OVERRIDE + expand (function_expander &) const override { return CONST0_RTX (VNx16BImode); } @@ -1625,7 +1625,7 @@ public: CONSTEXPR svpfirst_svpnext_impl (int unspec) : m_unspec (unspec) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode mode = e.vector_mode (0); e.add_ptrue_hint (0, mode); @@ -1643,13 +1643,13 @@ public: CONSTEXPR svprf_bhwd_impl (machine_mode mode) : m_mode (mode) {} unsigned int - call_properties (const function_instance &) const OVERRIDE + call_properties (const function_instance &) const override { return CP_PREFETCH_MEMORY; } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { e.prepare_prefetch_operands (); insn_code icode = code_for_aarch64_sve_prefetch (m_mode); @@ -1667,19 +1667,19 @@ public: CONSTEXPR svprf_bhwd_gather_impl (machine_mode mode) : m_mode (mode) {} unsigned int - call_properties (const function_instance &) const OVERRIDE + call_properties (const function_instance &) const override { return CP_PREFETCH_MEMORY; } machine_mode - memory_vector_mode (const function_instance &) const OVERRIDE + memory_vector_mode (const function_instance &) const override { return m_mode; } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { e.prepare_prefetch_operands (); e.prepare_gather_address_operands (1); @@ -1705,7 +1705,7 @@ public: CONSTEXPR svptest_impl (rtx_code compare) : m_compare (compare) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* See whether GP is an exact ptrue for some predicate mode; i.e. whether converting the GP to that mode will not drop @@ -1751,13 +1751,13 @@ class svptrue_impl : public function_base { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { return f.fold_to_ptrue (); } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { return aarch64_ptrue_all (e.type_suffix (0).element_bytes); } @@ -1767,7 +1767,7 @@ class svptrue_pat_impl : public function_base { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree pattern_arg = gimple_call_arg (f.call, 0); aarch64_svpattern pattern = (aarch64_svpattern) tree_to_shwi (pattern_arg); @@ -1788,7 +1788,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* In rtl, the predicate is represented as the constant: @@ -1816,7 +1816,7 @@ public: {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* Treat non-_pat functions in the same way as _pat functions with an SV_ALL argument. */ @@ -1877,7 +1877,7 @@ public: {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { rtx_code code = (e.type_suffix (0).unsigned_p ? m_code_for_uint @@ -1908,13 +1908,13 @@ class svrdffr_impl : public function_base { public: unsigned int - call_properties (const function_instance &) const OVERRIDE + call_properties (const function_instance &) const override { return CP_READ_FFR; } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* See the block comment in aarch64-sve.md for details about the FFR handling. */ @@ -1931,7 +1931,7 @@ class svreinterpret_impl : public quiet { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { /* Punt to rtl if the effect of the reinterpret on registers does not conform to GCC's endianness model. */ @@ -1947,7 +1947,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode mode = e.vector_mode (0); return e.use_exact_insn (code_for_aarch64_sve_reinterpret (mode)); @@ -1958,7 +1958,7 @@ class svrev_impl : public permute { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { /* Punt for now on _b16 and wider; we'd need more complex evpc logic to rerecognize the result. */ @@ -1974,7 +1974,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { return e.use_exact_insn (code_for_aarch64_sve_rev (e.vector_mode (0))); } @@ -1984,7 +1984,7 @@ class svsel_impl : public quiet { public: gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { /* svsel corresponds exactly to VEC_COND_EXPR. */ gimple_seq stmts = NULL; @@ -1996,7 +1996,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* svsel (cond, truev, falsev) is vcond_mask (truev, falsev, cond). */ e.rotate_inputs_left (0, 3); @@ -2015,7 +2015,7 @@ public: : quiet (vectors_per_tuple) {} gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree rhs_tuple = gimple_call_arg (f.call, 0); tree index = gimple_call_arg (f.call, 1); @@ -2042,7 +2042,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { rtx rhs_tuple = e.args[0]; unsigned int index = INTVAL (e.args[1]); @@ -2065,13 +2065,13 @@ class svsetffr_impl : public function_base { public: unsigned int - call_properties (const function_instance &) const OVERRIDE + call_properties (const function_instance &) const override { return CP_WRITE_FFR; } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { e.args.quick_push (CONSTM1_RTX (VNx16BImode)); return e.use_exact_insn (CODE_FOR_aarch64_wrffr); @@ -2082,13 +2082,13 @@ class svst1_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; } gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree vectype = f.vector_type (0); @@ -2105,7 +2105,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { insn_code icode = convert_optab_handler (maskstore_optab, e.vector_mode (0), e.gp_mode (0)); @@ -2117,13 +2117,13 @@ class svst1_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); /* Put the predicate last, as required by mask_scatter_store_optab. */ @@ -2144,7 +2144,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); /* Put the predicate last, since the truncating scatters use the same @@ -2164,7 +2164,7 @@ public: : truncating_store (to_mode) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { insn_code icode = code_for_aarch64_store_trunc (e.memory_vector_mode (), e.vector_mode (0)); @@ -2180,13 +2180,13 @@ public: : full_width_access (vectors_per_tuple) {} unsigned int - call_properties (const function_instance &) const OVERRIDE + call_properties (const function_instance &) const override { return CP_WRITE_MEMORY; } gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { tree vectype = f.vector_type (0); @@ -2208,7 +2208,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode tuple_mode = GET_MODE (e.args.last ()); insn_code icode = convert_optab_handler (vec_mask_store_lanes_optab, @@ -2221,13 +2221,13 @@ class svstnt1_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 { insn_code icode = code_for_aarch64_stnt1 (e.vector_mode (0)); return e.use_contiguous_store_insn (icode); @@ -2241,7 +2241,7 @@ public: : rtx_code_function (MINUS, MINUS, UNSPEC_COND_FSUB) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* Canonicalize subtractions of constants to additions. */ machine_mode mode = e.vector_mode (0); @@ -2256,7 +2256,7 @@ class svtbl_impl : public permute { public: rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { return e.use_exact_insn (code_for_aarch64_sve_tbl (e.vector_mode (0))); } @@ -2270,7 +2270,7 @@ public: : binary_permute (base ? UNSPEC_TRN2 : UNSPEC_TRN1), m_base (base) {} gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { /* svtrn1: { 0, nelts, 2, nelts + 2, 4, nelts + 4, ... } svtrn2: as for svtrn1, but with 1 added to each index. */ @@ -2296,7 +2296,7 @@ public: : quiet (vectors_per_tuple) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { rtx target = e.get_reg_target (); emit_clobber (copy_rtx (target)); @@ -2311,7 +2311,7 @@ public: CONSTEXPR svunpk_impl (bool high_p) : m_high_p (high_p) {} gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { /* Don't fold the predicate ops, since every bit of the svbool_t result is significant. */ @@ -2326,7 +2326,7 @@ public: } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { machine_mode mode = GET_MODE (e.args[0]); unsigned int unpacku = m_high_p ? UNSPEC_UNPACKUHI : UNSPEC_UNPACKULO; @@ -2353,7 +2353,7 @@ public: CONSTEXPR svusdot_impl (bool su) : m_su (su) {} rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { /* The implementation of the ACLE function svsudot (for the non-lane version) is through the USDOT instruction but with the second and third @@ -2382,7 +2382,7 @@ public: : binary_permute (base ? UNSPEC_UZP2 : UNSPEC_UZP1), m_base (base) {} gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { /* svuzp1: { 0, 2, 4, 6, ... } svuzp2: { 1, 3, 5, 7, ... }. */ @@ -2456,7 +2456,7 @@ public: } gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { if (f.type_suffix (1).unsigned_p) return fold_type (f); @@ -2472,13 +2472,13 @@ class svwrffr_impl : public function_base { public: unsigned int - call_properties (const function_instance &) const OVERRIDE + call_properties (const function_instance &) const override { return CP_WRITE_FFR; } rtx - expand (function_expander &e) const OVERRIDE + expand (function_expander &e) const override { return e.use_exact_insn (CODE_FOR_aarch64_wrffr); } @@ -2492,7 +2492,7 @@ public: : binary_permute (base ? UNSPEC_ZIP2 : UNSPEC_ZIP1), m_base (base) {} gimple * - fold (gimple_folder &f) const OVERRIDE + fold (gimple_folder &f) const override { /* svzip1: { 0, nelts, 1, nelts + 1, 2, nelts + 2, ... } svzip2: as for svzip1, but with nelts / 2 added to each index. */ diff --git a/gcc/config/aarch64/aarch64-sve-builtins-functions.h b/gcc/config/aarch64/aarch64-sve-builtins-functions.h index 9d346b6..b8a86e3 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins-functions.h +++ b/gcc/config/aarch64/aarch64-sve-builtins-functions.h @@ -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. */ diff --git a/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc b/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc index f57f926..8e26bd8 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc @@ -454,13 +454,13 @@ long_type_suffix (function_resolver &r, type_suffix_index type) struct nonoverloaded_base : public function_shape { bool - explicit_type_suffix_p (unsigned int) const OVERRIDE + explicit_type_suffix_p (unsigned int) const override { return true; } tree - resolve (function_resolver &) const OVERRIDE + resolve (function_resolver &) const override { gcc_unreachable (); } @@ -472,7 +472,7 @@ template struct overloaded_base : public function_shape { bool - explicit_type_suffix_p (unsigned int i) const OVERRIDE + explicit_type_suffix_p (unsigned int i) const override { return (EXPLICIT_MASK >> i) & 1; } @@ -484,7 +484,7 @@ struct adr_base : public overloaded_base<0> /* The function takes two arguments: a vector base and a vector displacement (either an index or an offset). Resolve based on them both. */ tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; mode_suffix_index mode; @@ -503,7 +503,7 @@ template struct binary_imm_narrowb_base : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_n); STATIC_ASSERT (CLASS == function_resolver::SAME_TYPE_CLASS @@ -515,7 +515,7 @@ struct binary_imm_narrowb_base : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (1, 1); } @@ -528,7 +528,7 @@ template struct binary_imm_narrowt_base : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_n); STATIC_ASSERT (CLASS == function_resolver::SAME_TYPE_CLASS @@ -540,7 +540,7 @@ struct binary_imm_narrowt_base : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -560,14 +560,14 @@ struct binary_imm_narrowt_base : public overloaded_base<0> struct binary_imm_long_base : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_n); build_all (b, "v0,vh0,su64", group, MODE_n); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type, result_type; @@ -623,7 +623,7 @@ struct inc_dec_base : public overloaded_base<0> } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_range (m_pat_p ? 2 : 1, 1, 16); } @@ -637,7 +637,7 @@ struct load_contiguous_base : public overloaded_base<0> /* Resolve a call based purely on a pointer argument. The other arguments are a governing predicate and (for MODE_vnum) a vnum offset. */ tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { bool vnum_p = r.mode_suffix_id == MODE_vnum; gcc_assert (r.mode_suffix_id == MODE_none || vnum_p); @@ -658,7 +658,7 @@ struct load_contiguous_base : public overloaded_base<0> struct load_gather_sv_base : public overloaded_base<0> { tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; mode_suffix_index mode; @@ -686,7 +686,7 @@ struct load_ext_gather_base : public overloaded_base<1> The function has an explicit type suffix that determines the type of the loaded data. */ tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { /* No resolution is needed for a vector base with no displacement; there's a one-to-one mapping between short and long names. */ @@ -713,7 +713,7 @@ struct load_ext_gather_base : public overloaded_base<1> struct mmla_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); /* svmmla is distributed over several extensions. Allow the common @@ -729,7 +729,7 @@ struct mmla_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -769,7 +769,7 @@ struct prefetch_gather_base : public overloaded_base<0> The prefetch operation is the final argument. This is purely a mode-based resolution; there are no type suffixes. */ tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { bool has_displacement_p = r.displacement_units () != UNITS_none; @@ -791,7 +791,7 @@ template struct shift_right_imm_narrow_wrapper : public BASE { bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { unsigned int bits = c.type_suffix (0).element_bits / 2; return c.require_immediate_range (N, 1, bits); @@ -811,7 +811,7 @@ struct store_scatter_base : public overloaded_base<0> The stored data is the final argument, and it determines the type suffix. */ tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { bool has_displacement_p = r.displacement_units () != UNITS_none; @@ -832,14 +832,14 @@ struct store_scatter_base : public overloaded_base<0> struct ternary_shift_imm_base : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_n); build_all (b, "v0,v0,v0,su64", group, MODE_n); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (2, 1); } @@ -862,7 +862,7 @@ template { tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -884,7 +884,7 @@ template { tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -908,7 +908,7 @@ template { tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -932,14 +932,14 @@ struct ternary_bfloat_lane_base : public ternary_resize2_lane_base<16, TYPE_bfloat, TYPE_bfloat> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vB,vB,su64", group, MODE_none); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_lane_index (3, N); } @@ -954,7 +954,7 @@ struct ternary_qq_lane_base TYPE_CLASS2, TYPE_CLASS3> { bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_lane_index (3, 4); } @@ -966,7 +966,7 @@ template struct unary_narrowb_base : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); STATIC_ASSERT (CLASS == function_resolver::SAME_TYPE_CLASS @@ -978,7 +978,7 @@ struct unary_narrowb_base : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_unary (CLASS, r.HALF_SIZE); } @@ -991,7 +991,7 @@ template struct unary_narrowt_base : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); STATIC_ASSERT (CLASS == function_resolver::SAME_TYPE_CLASS @@ -1003,7 +1003,7 @@ struct unary_narrowt_base : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1023,7 +1023,7 @@ struct unary_narrowt_base : public overloaded_base<0> struct adr_index_def : public adr_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_index); build_all (b, "b,b,d", group, MODE_u32base_s32index); @@ -1041,7 +1041,7 @@ SHAPE (adr_index) struct adr_offset_def : public adr_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_offset); build_all (b, "b,b,d", group, MODE_u32base_s32offset); @@ -1058,14 +1058,14 @@ SHAPE (adr_offset) struct binary_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (2); } @@ -1080,7 +1080,7 @@ SHAPE (binary) struct binary_int_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vs0", group, MODE_none); @@ -1088,7 +1088,7 @@ struct binary_int_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1108,20 +1108,20 @@ SHAPE (binary_int_opt_n) struct binary_lane_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (2, 1); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_lane_index (2); } @@ -1135,14 +1135,14 @@ SHAPE (binary_lane) struct binary_long_lane_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,vh0,vh0,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type, result_type; @@ -1160,7 +1160,7 @@ struct binary_long_lane_def : public overloaded_base<0> } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_lane_index (2); } @@ -1172,7 +1172,7 @@ SHAPE (binary_long_lane) struct binary_long_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,vh0,vh0", group, MODE_none); @@ -1180,7 +1180,7 @@ struct binary_long_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type, result_type; @@ -1202,14 +1202,14 @@ SHAPE (binary_long_opt_n) struct binary_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_n); build_all (b, "v0,v0,s0", group, MODE_n); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1231,7 +1231,7 @@ SHAPE (binary_n) struct binary_narrowb_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "vh0,v0,v0", group, MODE_none); @@ -1239,7 +1239,7 @@ struct binary_narrowb_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform_opt_n (2); } @@ -1253,7 +1253,7 @@ SHAPE (binary_narrowb_opt_n) struct binary_narrowt_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "vh0,vh0,v0,v0", group, MODE_none); @@ -1261,7 +1261,7 @@ struct binary_narrowt_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1284,7 +1284,7 @@ SHAPE (binary_narrowt_opt_n) struct binary_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0", group, MODE_none); @@ -1298,7 +1298,7 @@ struct binary_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform_opt_n (2); } @@ -1309,7 +1309,7 @@ SHAPE (binary_opt_n) struct binary_pred_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "v0,v0,v0", group, MODE_none); } @@ -1322,20 +1322,20 @@ SHAPE (binary_pred) struct binary_rotate_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (2, 1); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_either_or (2, 90, 270); } @@ -1349,7 +1349,7 @@ SHAPE (binary_rotate) struct binary_scalar_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "v0,s0,s0", group, MODE_none); } @@ -1362,14 +1362,14 @@ SHAPE (binary_scalar) struct binary_to_uint_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "vu0,v0,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (2); } @@ -1383,14 +1383,14 @@ SHAPE (binary_to_uint) struct binary_uint_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vu0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1411,14 +1411,14 @@ SHAPE (binary_uint) struct binary_uint_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,su0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1440,7 +1440,7 @@ SHAPE (binary_uint_n) struct binary_uint_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vu0", group, MODE_none); @@ -1448,7 +1448,7 @@ struct binary_uint_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1468,14 +1468,14 @@ SHAPE (binary_uint_opt_n) struct binary_uint64_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1497,7 +1497,7 @@ SHAPE (binary_uint64_n) struct binary_uint64_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vu64", group, MODE_none); @@ -1505,7 +1505,7 @@ struct binary_uint64_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1522,14 +1522,14 @@ SHAPE (binary_uint64_opt_n) struct binary_wide_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vh0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1549,7 +1549,7 @@ SHAPE (binary_wide) struct binary_wide_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vh0", group, MODE_none); @@ -1557,7 +1557,7 @@ struct binary_wide_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1576,7 +1576,7 @@ SHAPE (binary_wide_opt_n) struct clast_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0", group, MODE_none); @@ -1584,7 +1584,7 @@ struct clast_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; if (!r.check_gp_argument (2, i, nargs) @@ -1615,14 +1615,14 @@ SHAPE (clast) struct compare_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "vp,v0,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (2); } @@ -1636,7 +1636,7 @@ SHAPE (compare) struct compare_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "vp,v0,v0", group, MODE_none); @@ -1644,7 +1644,7 @@ struct compare_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform_opt_n (2); } @@ -1655,14 +1655,14 @@ SHAPE (compare_opt_n) struct compare_ptr_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "vp,al,al", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1684,14 +1684,14 @@ SHAPE (compare_ptr) struct compare_scalar_def : public overloaded_base<1> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "vp,s1,s1", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1714,7 +1714,7 @@ SHAPE (compare_scalar) struct compare_wide_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "vp,v0,vw0", group, MODE_none); @@ -1722,7 +1722,7 @@ struct compare_wide_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1739,7 +1739,7 @@ SHAPE (compare_wide_opt_n) struct count_inherent_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "su64", group, MODE_none); } @@ -1750,7 +1750,7 @@ SHAPE (count_inherent) struct count_pat_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "su64,epattern", group, MODE_none); } @@ -1761,7 +1761,7 @@ SHAPE (count_pat) struct count_pred_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "su64,vp", group, MODE_none); } @@ -1772,14 +1772,14 @@ SHAPE (count_pred) struct count_vector_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "su64,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (1); } @@ -1792,14 +1792,14 @@ SHAPE (count_vector) struct create_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "t0,v0*t", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (r.vectors_per_tuple ()); } @@ -1813,7 +1813,7 @@ SHAPE (create) struct dupq_def : public overloaded_base<1> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { /* The "_n" suffix is optional; the full name has it, but the short name doesn't. */ @@ -1821,7 +1821,7 @@ struct dupq_def : public overloaded_base<1> } tree - resolve (function_resolver &) const OVERRIDE + resolve (function_resolver &) const override { /* The short forms just make "_n" implicit, so no resolution is needed. */ gcc_unreachable (); @@ -1836,20 +1836,20 @@ SHAPE (dupq) struct ext_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (2, 1); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { unsigned int bytes = c.type_suffix (0).element_bytes; return c.require_immediate_range (2, 0, 256 / bytes - 1); @@ -1861,14 +1861,14 @@ SHAPE (ext) struct fold_left_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "s0,s0,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1889,14 +1889,14 @@ SHAPE (fold_left) struct get_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,t0,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1909,7 +1909,7 @@ struct get_def : public overloaded_base<0> } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { unsigned int nvectors = c.vectors_per_tuple (); return c.require_immediate_range (1, 0, nvectors - 1); @@ -1927,7 +1927,7 @@ struct inc_dec_def : public inc_dec_base CONSTEXPR inc_dec_def () : inc_dec_base (false) {} void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); /* These functions are unusual in that the type suffixes for @@ -1952,7 +1952,7 @@ struct inc_dec_pat_def : public inc_dec_base CONSTEXPR inc_dec_pat_def () : inc_dec_base (true) {} void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); /* These functions are unusual in that the type suffixes for @@ -1971,14 +1971,14 @@ SHAPE (inc_dec_pat) struct inc_dec_pred_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vp", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -1998,14 +1998,14 @@ SHAPE (inc_dec_pred) struct inc_dec_pred_scalar_def : public overloaded_base<2> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_n); build_all (b, "s0,s0,vp", group, MODE_n); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -2023,7 +2023,7 @@ SHAPE (inc_dec_pred_scalar) struct inherent_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "t0", group, MODE_none); } @@ -2034,7 +2034,7 @@ SHAPE (inherent) struct inherent_b_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { /* The "_b" suffix is optional; the full name has it, but the short name doesn't. */ @@ -2042,7 +2042,7 @@ struct inherent_b_def : public overloaded_base<0> } tree - resolve (function_resolver &) const OVERRIDE + resolve (function_resolver &) const override { /* The short forms just make "_b" implicit, so no resolution is needed. */ gcc_unreachable (); @@ -2055,7 +2055,7 @@ SHAPE (inherent_b) struct load_def : public load_contiguous_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); b.add_overloaded_functions (group, MODE_vnum); @@ -2072,7 +2072,7 @@ SHAPE (load) struct load_ext_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "t0,al", group, MODE_none); build_all (b, "t0,al,ss64", group, MODE_vnum); @@ -2092,7 +2092,7 @@ SHAPE (load_ext) struct load_ext_gather_index_def : public load_ext_gather_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_index); build_sv_index (b, "t0,al,d", group); @@ -2112,7 +2112,7 @@ SHAPE (load_ext_gather_index) struct load_ext_gather_index_restricted_def : public load_ext_gather_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_index); build_sv_index64 (b, "t0,al,d", group); @@ -2136,7 +2136,7 @@ SHAPE (load_ext_gather_index_restricted) struct load_ext_gather_offset_def : public load_ext_gather_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_offset); build_sv_offset (b, "t0,al,d", group); @@ -2161,7 +2161,7 @@ SHAPE (load_ext_gather_offset) struct load_ext_gather_offset_restricted_def : public load_ext_gather_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_offset); build_sv_uint_offset (b, "t0,al,d", group); @@ -2183,7 +2183,7 @@ SHAPE (load_ext_gather_offset_restricted) struct load_gather_sv_def : public load_gather_sv_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_index); b.add_overloaded_functions (group, MODE_offset); @@ -2205,7 +2205,7 @@ SHAPE (load_gather_sv) struct load_gather_sv_restricted_def : public load_gather_sv_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_index); b.add_overloaded_functions (group, MODE_offset); @@ -2226,7 +2226,7 @@ SHAPE (load_gather_sv_restricted) struct load_gather_vs_def : public overloaded_base<1> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { /* The base vector mode is optional; the full name has it but the short name doesn't. There is no ambiguity with SHAPE_load_gather_sv @@ -2237,7 +2237,7 @@ struct load_gather_vs_def : public overloaded_base<1> } tree - resolve (function_resolver &) const OVERRIDE + resolve (function_resolver &) const override { /* The short name just makes the base vector mode implicit; no resolution is needed. */ @@ -2252,7 +2252,7 @@ SHAPE (load_gather_vs) struct load_replicate_def : public load_contiguous_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "t0,al", group, MODE_none); @@ -2264,7 +2264,7 @@ SHAPE (load_replicate) struct pattern_pred_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "vp,epattern", group, MODE_none); } @@ -2276,7 +2276,7 @@ SHAPE (pattern_pred) struct prefetch_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "_,ap,eprfop", group, MODE_none); build_all (b, "_,ap,ss64,eprfop", group, MODE_vnum); @@ -2297,7 +2297,7 @@ SHAPE (prefetch) struct prefetch_gather_index_def : public prefetch_gather_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); b.add_overloaded_functions (group, MODE_index); @@ -2321,7 +2321,7 @@ SHAPE (prefetch_gather_index) struct prefetch_gather_offset_def : public prefetch_gather_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); b.add_overloaded_functions (group, MODE_offset); @@ -2336,7 +2336,7 @@ SHAPE (prefetch_gather_offset) struct ptest_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "sp,vp", group, MODE_none); } @@ -2347,7 +2347,7 @@ SHAPE (ptest) struct rdffr_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "vp", group, MODE_none); } @@ -2358,14 +2358,14 @@ SHAPE (rdffr) struct reduction_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "s0,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (1); } @@ -2381,14 +2381,14 @@ SHAPE (reduction) struct reduction_wide_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "sw0,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (1); } @@ -2402,14 +2402,14 @@ SHAPE (reduction_wide) struct set_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "t0,t0,su64,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -2423,7 +2423,7 @@ struct set_def : public overloaded_base<0> } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { unsigned int nvectors = c.vectors_per_tuple (); return c.require_immediate_range (1, 0, nvectors - 1); @@ -2435,7 +2435,7 @@ SHAPE (set) struct setffr_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "_", group, MODE_none); } @@ -2449,20 +2449,20 @@ SHAPE (setffr) struct shift_left_imm_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_n); build_all (b, "v0,v0,su64", group, MODE_n); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (1, 1); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { unsigned int bits = c.type_suffix (0).element_bits; return c.require_immediate_range (1, 0, bits - 1); @@ -2477,7 +2477,7 @@ SHAPE (shift_left_imm) struct shift_left_imm_long_def : public binary_imm_long_base { bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { unsigned int bits = c.type_suffix (0).element_bits / 2; return c.require_immediate_range (1, 0, bits - 1); @@ -2492,7 +2492,7 @@ SHAPE (shift_left_imm_long) struct shift_left_imm_to_uint_def : public shift_left_imm_def { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_n); build_all (b, "vu0,v0,su64", group, MODE_n); @@ -2507,20 +2507,20 @@ SHAPE (shift_left_imm_to_uint) struct shift_right_imm_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_n); build_all (b, "v0,v0,su64", group, MODE_n); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (1, 1); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { unsigned int bits = c.type_suffix (0).element_bits; return c.require_immediate_range (1, 1, bits); @@ -2572,7 +2572,7 @@ SHAPE (shift_right_imm_narrowt_to_uint) struct store_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); b.add_overloaded_functions (group, MODE_vnum); @@ -2581,7 +2581,7 @@ struct store_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { bool vnum_p = r.mode_suffix_id == MODE_vnum; gcc_assert (r.mode_suffix_id == MODE_none || vnum_p); @@ -2612,7 +2612,7 @@ SHAPE (store) struct store_scatter_index_def : public store_scatter_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_index); build_sv_index (b, "_,as,d,t0", group); @@ -2632,7 +2632,7 @@ SHAPE (store_scatter_index) struct store_scatter_index_restricted_def : public store_scatter_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_index); build_sv_index64 (b, "_,as,d,t0", group); @@ -2657,7 +2657,7 @@ SHAPE (store_scatter_index_restricted) struct store_scatter_offset_def : public store_scatter_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); b.add_overloaded_functions (group, MODE_offset); @@ -2683,7 +2683,7 @@ SHAPE (store_scatter_offset) struct store_scatter_offset_restricted_def : public store_scatter_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); b.add_overloaded_functions (group, MODE_offset); @@ -2698,14 +2698,14 @@ SHAPE (store_scatter_offset_restricted) struct tbl_tuple_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,t0,vu0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -2724,7 +2724,7 @@ struct ternary_bfloat_def : public ternary_resize2_base<16, TYPE_bfloat, TYPE_bfloat> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vB,vB", group, MODE_none); @@ -2752,7 +2752,7 @@ struct ternary_bfloat_opt_n_def : public ternary_resize2_opt_n_base<16, TYPE_bfloat, TYPE_bfloat> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vB,vB", group, MODE_none); @@ -2770,7 +2770,7 @@ struct ternary_intq_uintq_lane_def : public ternary_qq_lane_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vqs0,vqu0,su64", group, MODE_none); @@ -2786,7 +2786,7 @@ struct ternary_intq_uintq_opt_n_def TYPE_signed, TYPE_unsigned> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vqs0,vqu0", group, MODE_none); @@ -2802,20 +2802,20 @@ SHAPE (ternary_intq_uintq_opt_n) struct ternary_lane_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0,v0,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (3, 1); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_lane_index (3); } @@ -2830,20 +2830,20 @@ SHAPE (ternary_lane) struct ternary_lane_rotate_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0,v0,su64,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (3, 2); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return (c.require_immediate_lane_index (3, 2) && c.require_immediate_one_of (4, 0, 90, 180, 270)); @@ -2859,14 +2859,14 @@ struct ternary_long_lane_def : public ternary_resize2_lane_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vh0,vh0,su64", group, MODE_none); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_lane_index (3); } @@ -2883,7 +2883,7 @@ struct ternary_long_opt_n_def : public ternary_resize2_opt_n_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vh0,vh0", group, MODE_none); @@ -2900,7 +2900,7 @@ SHAPE (ternary_long_opt_n) struct ternary_opt_n_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0,v0", group, MODE_none); @@ -2908,7 +2908,7 @@ struct ternary_opt_n_def : public overloaded_base<0> } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform_opt_n (3); } @@ -2922,7 +2922,7 @@ SHAPE (ternary_opt_n) struct ternary_qq_lane_def : public ternary_qq_lane_base<> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vq0,vq0,su64", group, MODE_none); @@ -2938,14 +2938,14 @@ SHAPE (ternary_qq_lane) struct ternary_qq_lane_rotate_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vq0,vq0,su64,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -2963,7 +2963,7 @@ struct ternary_qq_lane_rotate_def : public overloaded_base<0> } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return (c.require_immediate_lane_index (3, 4) && c.require_immediate_one_of (4, 0, 90, 180, 270)); @@ -2981,7 +2981,7 @@ struct ternary_qq_opt_n_def : public ternary_resize2_opt_n_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vq0,vq0", group, MODE_none); @@ -2998,14 +2998,14 @@ SHAPE (ternary_qq_opt_n) struct ternary_qq_rotate_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vq0,vq0,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -3022,7 +3022,7 @@ struct ternary_qq_rotate_def : public overloaded_base<0> } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_one_of (3, 0, 90, 180, 270); } @@ -3036,20 +3036,20 @@ SHAPE (ternary_qq_rotate) struct ternary_rotate_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0,v0,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (3, 1); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_one_of (3, 0, 90, 180, 270); } @@ -3063,7 +3063,7 @@ SHAPE (ternary_rotate) struct ternary_shift_left_imm_def : public ternary_shift_imm_base { bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { unsigned int bits = c.type_suffix (0).element_bits; return c.require_immediate_range (2, 0, bits - 1); @@ -3078,7 +3078,7 @@ SHAPE (ternary_shift_left_imm) struct ternary_shift_right_imm_def : public ternary_shift_imm_base { bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { unsigned int bits = c.type_suffix (0).element_bits; return c.require_immediate_range (2, 1, bits); @@ -3090,14 +3090,14 @@ SHAPE (ternary_shift_right_imm) struct ternary_uint_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0,vu0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -3119,7 +3119,7 @@ struct ternary_uintq_intq_def TYPE_unsigned, TYPE_signed> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vqu0,vqs0", group, MODE_none); @@ -3136,7 +3136,7 @@ struct ternary_uintq_intq_lane_def : public ternary_qq_lane_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vqu0,vqs0,su64", group, MODE_none); @@ -3152,7 +3152,7 @@ struct ternary_uintq_intq_opt_n_def TYPE_unsigned, TYPE_signed> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,vqu0,vqs0", group, MODE_none); @@ -3168,20 +3168,20 @@ SHAPE (ternary_uintq_intq_opt_n) struct tmad_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0,v0,su64", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_uniform (2, 1); } bool - check (function_checker &c) const OVERRIDE + check (function_checker &c) const override { return c.require_immediate_range (2, 0, 7); } @@ -3195,14 +3195,14 @@ SHAPE (tmad) struct unary_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_unary (); } @@ -3216,14 +3216,14 @@ SHAPE (unary) struct unary_convert_def : public overloaded_base<1> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v1", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_unary (r.type_suffix (0).tclass, r.type_suffix (0).element_bits); @@ -3239,14 +3239,14 @@ SHAPE (unary_convert) struct unary_convert_narrowt_def : public overloaded_base<1> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,v1", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_unary (r.type_suffix (0).tclass, r.type_suffix (0).element_bits, true); @@ -3258,14 +3258,14 @@ SHAPE (unary_convert_narrowt) struct unary_long_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,vh0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type, result_type; @@ -3286,7 +3286,7 @@ SHAPE (unary_long) struct unary_n_def : public overloaded_base<1> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { /* The "_n" suffix is optional; the full name has it, but the short name doesn't. */ @@ -3294,7 +3294,7 @@ struct unary_n_def : public overloaded_base<1> } tree - resolve (function_resolver &) const OVERRIDE + resolve (function_resolver &) const override { /* The short forms just make "_n" implicit, so no resolution is needed. */ gcc_unreachable (); @@ -3322,7 +3322,7 @@ SHAPE (unary_narrowt_to_uint) struct unary_pred_def : public nonoverloaded_base { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { build_all (b, "v0,v0", group, MODE_none); } @@ -3336,14 +3336,14 @@ SHAPE (unary_pred) struct unary_to_int_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "vs0,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_unary (TYPE_signed); } @@ -3357,14 +3357,14 @@ SHAPE (unary_to_int) struct unary_to_uint_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "vu0,v0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { return r.resolve_unary (TYPE_unsigned); } @@ -3378,14 +3378,14 @@ SHAPE (unary_to_uint) struct unary_uint_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,vu0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; @@ -3414,14 +3414,14 @@ SHAPE (unary_uint) struct unary_widen_def : public overloaded_base<0> { void - build (function_builder &b, const function_group_info &group) const OVERRIDE + build (function_builder &b, const function_group_info &group) const override { b.add_overloaded_functions (group, MODE_none); build_all (b, "v0,vh0", group, MODE_none); } tree - resolve (function_resolver &r) const OVERRIDE + resolve (function_resolver &r) const override { unsigned int i, nargs; type_suffix_index type; diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc b/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc index e066f09..c010437 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc @@ -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 (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]); diff --git a/gcc/cp/cxx-pretty-print.h b/gcc/cp/cxx-pretty-print.h index 920af64..5080f70 100644 --- a/gcc/cp/cxx-pretty-print.h +++ b/gcc/cp/cxx-pretty-print.h @@ -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); diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc index 250e012..94181e7 100644 --- a/gcc/cp/error.cc +++ b/gcc/cp/error.cc @@ -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; diff --git a/gcc/diagnostic-path.h b/gcc/diagnostic-path.h index 3bd89d6..6c1190d 100644 --- a/gcc/diagnostic-path.h +++ b/gcc/diagnostic-path.h @@ -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, ...) diff --git a/gcc/digraph.cc b/gcc/digraph.cc index 06fd70b..6a1cb1b 100644 --- a/gcc/digraph.cc +++ b/gcc/digraph.cc @@ -51,7 +51,7 @@ struct test_graph_traits struct test_node : public dnode { 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 : dedge (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, ';'); } diff --git a/gcc/gcc-rich-location.h b/gcc/gcc-rich-location.h index a43fe38..789ce0e 100644 --- a/gcc/gcc-rich-location.h +++ b/gcc/gcc-rich-location.h @@ -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; diff --git a/gcc/gimple-array-bounds.cc b/gcc/gimple-array-bounds.cc index 7ec8b08..0b48bdb 100644 --- a/gcc/gimple-array-bounds.cc +++ b/gcc/gimple-array-bounds.cc @@ -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; diff --git a/gcc/gimple-loop-versioning.cc b/gcc/gimple-loop-versioning.cc index 5838ce7..ab02bdd 100644 --- a/gcc/gimple-loop-versioning.cc +++ b/gcc/gimple-loop-versioning.cc @@ -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. */ diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index 56f4577..c726393 100644 --- a/gcc/gimple-range-cache.cc +++ b/gcc/gimple-range-cache.cc @@ -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); diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h index 42aa41b..555fe32 100644 --- a/gcc/gimple-range-cache.h +++ b/gcc/gimple-range-cache.h @@ -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; diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc index 5f1b3b9..0a947c1 100644 --- a/gcc/gimple-range-fold.cc +++ b/gcc/gimple-range-fold.cc @@ -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; diff --git a/gcc/gimple-range-fold.h b/gcc/gimple-range-fold.h index 4fe8d06..53a5bf8 100644 --- a/gcc/gimple-range-fold.h +++ b/gcc/gimple-range-fold.h @@ -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; }; diff --git a/gcc/gimple-range-tests.cc b/gcc/gimple-range-tests.cc index fae888d..572acd3 100644 --- a/gcc/gimple-range-tests.cc +++ b/gcc/gimple-range-tests.cc @@ -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) { diff --git a/gcc/gimple-range.h b/gcc/gimple-range.h index ae6c402..13d4c77 100644 --- a/gcc/gimple-range.h +++ b/gcc/gimple-range.h @@ -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; diff --git a/gcc/gimple-ssa-evrp.cc b/gcc/gimple-ssa-evrp.cc index 92dbdd5..20388ed 100644 --- a/gcc/gimple-ssa-evrp.cc +++ b/gcc/gimple-ssa-evrp.cc @@ -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); diff --git a/gcc/input.cc b/gcc/input.cc index 58beba0..2acbfde 100644 --- a/gcc/input.cc +++ b/gcc/input.cc @@ -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; diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h index b18aa4d..3ba02a0 100644 --- a/gcc/jit/jit-playback.h +++ b/gcc/jit/jit-playback.h @@ -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); diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc index 4305a96..697dee6 100644 --- a/gcc/jit/jit-recording.cc +++ b/gcc/jit/jit-recording.cc @@ -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; diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h index 78ee364..2dd8a95 100644 --- a/gcc/jit/jit-recording.h +++ b/gcc/jit/jit-recording.h @@ -441,11 +441,11 @@ public: static string * from_printf (context *ctxt, const char *fmt, ...) GNU_PRINTF(2, 3); - void replay_into (replayer *) FINAL OVERRIDE {} + void replay_into (replayer *) final override {} private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: size_t m_len; @@ -469,7 +469,7 @@ public: m_created_by_user (created_by_user) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; playback::location * playback_location (replayer *r) @@ -498,12 +498,12 @@ public: return static_cast (m_playback_obj); } - location *dyn_cast_location () FINAL OVERRIDE { return this; } + location *dyn_cast_location () final override { return this; } bool created_by_user () const { return m_created_by_user; } private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: string *m_filename; @@ -603,11 +603,11 @@ public: : type (ctxt), m_kind (kind) {} - type *dereference () FINAL OVERRIDE; + type *dereference () final override; - size_t get_size () FINAL OVERRIDE; + size_t get_size () final override; - bool accepts_writes_from (type *rtype) FINAL OVERRIDE + bool accepts_writes_from (type *rtype) final override { if (m_kind == GCC_JIT_TYPE_VOID_PTR) { @@ -629,20 +629,20 @@ public: return type::accepts_writes_from (rtype); } - bool is_int () const FINAL OVERRIDE; - bool is_float () const FINAL OVERRIDE; - bool is_bool () const FINAL OVERRIDE; - type *is_pointer () FINAL OVERRIDE { return dereference (); } - type *is_array () FINAL OVERRIDE { return NULL; } - bool is_void () const FINAL OVERRIDE { return m_kind == GCC_JIT_TYPE_VOID; } - bool is_signed () const FINAL OVERRIDE; + bool is_int () const final override; + bool is_float () const final override; + bool is_bool () const final override; + type *is_pointer () final override { return dereference (); } + type *is_array () final override { return NULL; } + bool is_void () const final override { return m_kind == GCC_JIT_TYPE_VOID; } + bool is_signed () const final override; public: - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: enum gcc_jit_types m_kind; @@ -656,24 +656,24 @@ public: : type (other_type->m_ctxt), m_other_type (other_type) {} - type *dereference () FINAL OVERRIDE { return m_other_type; } + type *dereference () final override { return m_other_type; } - size_t get_size () FINAL OVERRIDE; + size_t get_size () final override; - bool accepts_writes_from (type *rtype) FINAL OVERRIDE; + bool accepts_writes_from (type *rtype) final override; - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - bool is_int () const FINAL OVERRIDE { return false; } - bool is_float () const FINAL OVERRIDE { return false; } - bool is_bool () const FINAL OVERRIDE { return false; } - type *is_pointer () FINAL OVERRIDE { return m_other_type; } - type *is_array () FINAL OVERRIDE { return NULL; } - bool is_signed () const FINAL OVERRIDE { return false; } + bool is_int () const final override { return false; } + bool is_float () const final override { return false; } + bool is_bool () const final override { return false; } + type *is_pointer () final override { return m_other_type; } + type *is_array () final override { return NULL; } + bool is_signed () const final override { return false; } private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: type *m_other_type; @@ -689,17 +689,17 @@ public: : type (other_type->m_ctxt), m_other_type (other_type) {} - type *dereference () FINAL OVERRIDE { return m_other_type->dereference (); } + type *dereference () final override { return m_other_type->dereference (); } - size_t get_size () FINAL OVERRIDE { return m_other_type->get_size (); }; + size_t get_size () final override { return m_other_type->get_size (); }; - bool is_int () const FINAL OVERRIDE { return m_other_type->is_int (); } - bool is_float () const FINAL OVERRIDE { return m_other_type->is_float (); } - bool is_bool () const FINAL OVERRIDE { return m_other_type->is_bool (); } - type *is_pointer () FINAL OVERRIDE { return m_other_type->is_pointer (); } - type *is_array () FINAL OVERRIDE { return m_other_type->is_array (); } - struct_ *is_struct () FINAL OVERRIDE { return m_other_type->is_struct (); } - bool is_signed () const FINAL OVERRIDE { return m_other_type->is_signed (); } + bool is_int () const final override { return m_other_type->is_int (); } + bool is_float () const final override { return m_other_type->is_float (); } + bool is_bool () const final override { return m_other_type->is_bool (); } + type *is_pointer () final override { return m_other_type->is_pointer (); } + type *is_array () final override { return m_other_type->is_array (); } + struct_ *is_struct () final override { return m_other_type->is_struct (); } + bool is_signed () const final override { return m_other_type->is_signed (); } protected: type *m_other_type; @@ -712,14 +712,14 @@ public: memento_of_get_const (type *other_type) : decorated_type (other_type) {} - bool accepts_writes_from (type */*rtype*/) FINAL OVERRIDE + bool accepts_writes_from (type */*rtype*/) final override { /* Can't write to a "const". */ return false; } /* Strip off the "const", giving the underlying type. */ - type *unqualified () FINAL OVERRIDE { return m_other_type; } + type *unqualified () final override { return m_other_type; } virtual bool is_same_type_as (type *other) { @@ -730,11 +730,11 @@ public: virtual type *is_const () { return m_other_type; } - void replay_into (replayer *) FINAL OVERRIDE; + void replay_into (replayer *) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; }; /* Result of "gcc_jit_type_get_volatile". */ @@ -752,15 +752,15 @@ public: } /* Strip off the "volatile", giving the underlying type. */ - type *unqualified () FINAL OVERRIDE { return m_other_type; } + type *unqualified () final override { return m_other_type; } virtual type *is_volatile () { return m_other_type; } - void replay_into (replayer *) FINAL OVERRIDE; + void replay_into (replayer *) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; }; /* Result of "gcc_jit_type_get_aligned". */ @@ -772,13 +772,13 @@ public: m_alignment_in_bytes (alignment_in_bytes) {} /* Strip off the alignment, giving the underlying type. */ - type *unqualified () FINAL OVERRIDE { return m_other_type; } + type *unqualified () final override { return m_other_type; } - void replay_into (replayer *) FINAL OVERRIDE; + void replay_into (replayer *) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: size_t m_alignment_in_bytes; @@ -794,17 +794,17 @@ public: size_t get_num_units () const { return m_num_units; } - vector_type *dyn_cast_vector_type () FINAL OVERRIDE { return this; } + vector_type *dyn_cast_vector_type () final override { return this; } type *get_element_type () { return m_other_type; } - void replay_into (replayer *) FINAL OVERRIDE; + void replay_into (replayer *) final override; - vector_type *is_vector () FINAL OVERRIDE { return this; } + vector_type *is_vector () final override { return this; } private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: size_t m_num_units; @@ -823,21 +823,21 @@ class array_type : public type m_num_elements (num_elements) {} - type *dereference () FINAL OVERRIDE; + type *dereference () final override; - bool is_int () const FINAL OVERRIDE { return false; } - bool is_float () const FINAL OVERRIDE { return false; } - bool is_bool () const FINAL OVERRIDE { return false; } - type *is_pointer () FINAL OVERRIDE { return NULL; } - type *is_array () FINAL OVERRIDE { return m_element_type; } + bool is_int () const final override { return false; } + bool is_float () const final override { return false; } + bool is_bool () const final override { return false; } + type *is_pointer () final override { return NULL; } + type *is_array () final override { return m_element_type; } int num_elements () { return m_num_elements; } - bool is_signed () const FINAL OVERRIDE { return false; } + bool is_signed () const final override { return false; } - void replay_into (replayer *) FINAL OVERRIDE; + void replay_into (replayer *) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: location *m_loc; @@ -854,20 +854,20 @@ public: type **param_types, int is_variadic); - type *dereference () FINAL OVERRIDE; - function_type *dyn_cast_function_type () FINAL OVERRIDE { return this; } - function_type *as_a_function_type () FINAL OVERRIDE { return this; } + type *dereference () final override; + function_type *dyn_cast_function_type () final override { return this; } + function_type *as_a_function_type () final override { return this; } - bool is_same_type_as (type *other) FINAL OVERRIDE; + bool is_same_type_as (type *other) final override; - bool is_int () const FINAL OVERRIDE { return false; } - bool is_float () const FINAL OVERRIDE { return false; } - bool is_bool () const FINAL OVERRIDE { return false; } - type *is_pointer () FINAL OVERRIDE { return NULL; } - type *is_array () FINAL OVERRIDE { return NULL; } - bool is_signed () const FINAL OVERRIDE { return false; } + bool is_int () const final override { return false; } + bool is_float () const final override { return false; } + bool is_bool () const final override { return false; } + type *is_pointer () final override { return NULL; } + type *is_array () final override { return NULL; } + bool is_signed () const final override { return false; } - void replay_into (replayer *) FINAL OVERRIDE; + void replay_into (replayer *) final override; type * get_return_type () const { return m_return_type; } const vec &get_param_types () const { return m_param_types; } @@ -880,9 +880,9 @@ public: memento *ptr_type); private: - string * make_debug_string () FINAL OVERRIDE; + string * make_debug_string () final override; string * make_debug_string_with (const char *); - void write_reproducer (reproducer &r) FINAL OVERRIDE; + void write_reproducer (reproducer &r) final override; private: type *m_return_type; @@ -909,9 +909,9 @@ public: compound_type * get_container () const { return m_container; } void set_container (compound_type *c) { m_container = c; } - void replay_into (replayer *) OVERRIDE; + void replay_into (replayer *) override; - void write_to_dump (dump &d) OVERRIDE; + void write_to_dump (dump &d) override; playback::field * playback_field () const @@ -920,8 +920,8 @@ public: } private: - string * make_debug_string () OVERRIDE; - void write_reproducer (reproducer &r) OVERRIDE; + string * make_debug_string () override; + void write_reproducer (reproducer &r) override; protected: location *m_loc; @@ -943,13 +943,13 @@ public: m_width (width) {} - void replay_into (replayer *) FINAL OVERRIDE; + void replay_into (replayer *) final override; - void write_to_dump (dump &d) FINAL OVERRIDE; + void write_to_dump (dump &d) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: int m_width; @@ -972,16 +972,16 @@ public: int num_fields, field **fields); - type *dereference () FINAL OVERRIDE; + type *dereference () final override; - bool is_int () const FINAL OVERRIDE { return false; } - bool is_float () const FINAL OVERRIDE { return false; } - bool is_bool () const FINAL OVERRIDE { return false; } - type *is_pointer () FINAL OVERRIDE { return NULL; } - type *is_array () FINAL OVERRIDE { return NULL; } - bool is_signed () const FINAL OVERRIDE { return false; } + bool is_int () const final override { return false; } + bool is_float () const final override { return false; } + bool is_bool () const final override { return false; } + type *is_pointer () final override { return NULL; } + type *is_array () final override { return NULL; } + bool is_signed () const final override { return false; } - bool has_known_size () const FINAL OVERRIDE { return m_fields != NULL; } + bool has_known_size () const final override { return m_fields != NULL; } playback::compound_type * playback_compound_type () @@ -1002,20 +1002,20 @@ public: location *loc, string *name); - struct_ *dyn_cast_struct () FINAL OVERRIDE { return this; } + struct_ *dyn_cast_struct () final override { return this; } type * as_type () { return this; } - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - const char *access_as_type (reproducer &r) FINAL OVERRIDE; + const char *access_as_type (reproducer &r) final override; - struct_ *is_struct () FINAL OVERRIDE { return this; } + struct_ *is_struct () final override { return this; } private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; }; // memento of struct_::set_fields @@ -1026,16 +1026,16 @@ public: int num_fields, field **fields); - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void write_to_dump (dump &d) FINAL OVERRIDE; + void write_to_dump (dump &d) final override; int length () const { return m_fields.length (); } field *get_field (int i) const { return m_fields[i]; } private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: compound_type *m_struct_or_union; @@ -1049,13 +1049,13 @@ public: location *loc, string *name); - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - virtual bool is_union () const FINAL OVERRIDE { return true; } + virtual bool is_union () const final override { return true; } private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; }; /* An abstract base class for operations that visit all rvalues within an @@ -1192,7 +1192,7 @@ public: rvalue * as_rvalue () { return this; } - const char *access_as_rvalue (reproducer &r) OVERRIDE; + const char *access_as_rvalue (reproducer &r) override; virtual const char *access_as_lvalue (reproducer &r); virtual bool is_global () const { return false; } void set_tls_model (enum gcc_jit_tls_model model); @@ -1221,9 +1221,9 @@ public: lvalue * as_lvalue () { return this; } - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *) FINAL OVERRIDE {} + void visit_children (rvalue_visitor *) final override {} playback::param * playback_param () const @@ -1231,15 +1231,15 @@ public: return static_cast (m_playback_obj); } - param *dyn_cast_param () FINAL OVERRIDE { return this; } + param *dyn_cast_param () final override { return this; } - const char *access_as_rvalue (reproducer &r) FINAL OVERRIDE; - const char *access_as_lvalue (reproducer &r) FINAL OVERRIDE; + const char *access_as_rvalue (reproducer &r) final override; + const char *access_as_lvalue (reproducer &r) final override; private: - string * make_debug_string () FINAL OVERRIDE { return m_name; } - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override { return m_name; } + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_PRIMARY; } @@ -1261,7 +1261,7 @@ public: int is_variadic, enum built_in_function builtin_id); - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; playback::function * playback_function () const @@ -1291,7 +1291,7 @@ public: bool is_variadic () const { return m_is_variadic; } - void write_to_dump (dump &d) FINAL OVERRIDE; + void write_to_dump (dump &d) final override; void validate (); @@ -1300,8 +1300,8 @@ public: rvalue *get_address (location *loc); private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: location *m_loc; @@ -1395,7 +1395,7 @@ public: return static_cast (m_playback_obj); } - void write_to_dump (dump &d) FINAL OVERRIDE; + void write_to_dump (dump &d) final override; bool validate (); @@ -1407,10 +1407,10 @@ public: vec get_successor_blocks () const; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; void dump_to_dot (pretty_printer *pp); void dump_edges_to_dot (pretty_printer *pp); @@ -1446,13 +1446,13 @@ public: free (m_initializer); } - void replay_into (replayer *) FINAL OVERRIDE; + void replay_into (replayer *) final override; - void visit_children (rvalue_visitor *) FINAL OVERRIDE {} + void visit_children (rvalue_visitor *) final override {} - void write_to_dump (dump &d) FINAL OVERRIDE; + void write_to_dump (dump &d) final override; - bool is_global () const FINAL OVERRIDE { return true; } + bool is_global () const final override { return true; } void set_initializer (const void *initializer, @@ -1483,11 +1483,11 @@ public: void set_rvalue_init (rvalue *val) { m_rvalue_init = val; } private: - string * make_debug_string () FINAL OVERRIDE { return m_name; } + string * make_debug_string () final override { return m_name; } template void write_initializer_reproducer (const char *id, reproducer &r); - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_PRIMARY; } @@ -1512,18 +1512,18 @@ public: : rvalue (ctxt, loc, type), m_value (value) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *) FINAL OVERRIDE {} + void visit_children (rvalue_visitor *) final override {} - bool is_constant () const FINAL OVERRIDE { return true; } + bool is_constant () const final override { return true; } - bool get_wide_int (wide_int *out) const FINAL OVERRIDE; + bool get_wide_int (wide_int *out) const final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_PRIMARY; } @@ -1541,14 +1541,14 @@ public: : rvalue (ctxt, loc, ctxt->get_type (GCC_JIT_TYPE_CONST_CHAR_PTR)), m_value (value) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *) FINAL OVERRIDE {} + void visit_children (rvalue_visitor *) final override {} private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_PRIMARY; } @@ -1565,14 +1565,14 @@ public: vector_type *type, rvalue **elements); - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *) FINAL OVERRIDE; + void visit_children (rvalue_visitor *) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_PRIMARY; } @@ -1591,14 +1591,14 @@ public: : rvalue (ctxt, loc, type) { } - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *) FINAL OVERRIDE; + void visit_children (rvalue_visitor *) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_PRIMARY; } @@ -1621,14 +1621,14 @@ public: m_a (a) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_UNARY; } @@ -1651,14 +1651,14 @@ public: m_a (a), m_b (b) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override; private: enum gcc_jit_binary_op m_op; @@ -1679,14 +1679,14 @@ public: m_b (b) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override; private: enum gcc_jit_comparison m_op; @@ -1705,14 +1705,14 @@ public: m_rvalue (a) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_CAST; } @@ -1732,14 +1732,14 @@ public: m_rvalue (a) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_CAST; } @@ -1757,12 +1757,12 @@ class base_call : public rvalue int numargs, rvalue **args); - enum precedence get_precedence () const FINAL OVERRIDE + enum precedence get_precedence () const final override { return PRECEDENCE_POSTFIX; } - base_call *dyn_cast_base_call () FINAL OVERRIDE { return this; } + base_call *dyn_cast_base_call () final override { return this; } void set_require_tail_call (bool require_tail_call) { @@ -1786,13 +1786,13 @@ public: int numargs, rvalue **args); - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: function *m_func; @@ -1807,13 +1807,13 @@ public: int numargs, rvalue **args); - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: rvalue *m_fn_ptr; @@ -1831,14 +1831,14 @@ public: m_index (index) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_POSTFIX; } @@ -1860,14 +1860,14 @@ public: m_field (field) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_POSTFIX; } @@ -1889,14 +1889,14 @@ public: m_field (field) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_POSTFIX; } @@ -1918,14 +1918,14 @@ public: m_field (field) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_POSTFIX; } @@ -1944,14 +1944,14 @@ public: : lvalue (ctxt, loc, val->get_type ()->dereference ()), m_rvalue (val) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_UNARY; } @@ -1970,14 +1970,14 @@ public: m_lvalue (val) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_UNARY; } @@ -1996,14 +1996,14 @@ public: : rvalue (ctxt, loc, type), m_fn (fn) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *v) FINAL OVERRIDE; + void visit_children (rvalue_visitor *v) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_UNARY; } @@ -2023,16 +2023,16 @@ public: set_scope (func); } - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - void visit_children (rvalue_visitor *) FINAL OVERRIDE {} + void visit_children (rvalue_visitor *) final override {} - void write_to_dump (dump &d) FINAL OVERRIDE; + void write_to_dump (dump &d) final override; private: - string * make_debug_string () FINAL OVERRIDE { return m_name; } - void write_reproducer (reproducer &r) FINAL OVERRIDE; - enum precedence get_precedence () const FINAL OVERRIDE + string * make_debug_string () final override { return m_name; } + void write_reproducer (reproducer &r) final override; + enum precedence get_precedence () const final override { return PRECEDENCE_PRIMARY; } @@ -2047,7 +2047,7 @@ class statement : public memento public: virtual vec get_successor_blocks () const; - void write_to_dump (dump &d) FINAL OVERRIDE; + void write_to_dump (dump &d) final override; block *get_block () const { return m_block; } location *get_loc () const { return m_loc; } @@ -2078,11 +2078,11 @@ public: : statement (b, loc), m_rvalue (rvalue) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: rvalue *m_rvalue; @@ -2099,11 +2099,11 @@ public: m_lvalue (lvalue), m_rvalue (rvalue) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: lvalue *m_lvalue; @@ -2123,11 +2123,11 @@ public: m_op (op), m_rvalue (rvalue) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: lvalue *m_lvalue; @@ -2144,11 +2144,11 @@ public: : statement (b, loc), m_text (text) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: string *m_text; @@ -2167,13 +2167,13 @@ public: m_on_true (on_true), m_on_false (on_false) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - vec get_successor_blocks () const FINAL OVERRIDE; + vec get_successor_blocks () const final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: rvalue *m_boolval; @@ -2190,13 +2190,13 @@ public: : statement (b, loc), m_target (target) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - vec get_successor_blocks () const FINAL OVERRIDE; + vec get_successor_blocks () const final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: block *m_target; @@ -2211,13 +2211,13 @@ public: : statement (b, loc), m_rvalue (rvalue) {} - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - vec get_successor_blocks () const FINAL OVERRIDE; + vec get_successor_blocks () const final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: rvalue *m_rvalue; @@ -2240,12 +2240,12 @@ class case_ : public memento rvalue *get_max_value () const { return m_max_value; } block *get_dest_block () const { return m_dest_block; } - void replay_into (replayer *) FINAL OVERRIDE { /* empty */ } + void replay_into (replayer *) final override { /* empty */ } - void write_reproducer (reproducer &r) FINAL OVERRIDE; + void write_reproducer (reproducer &r) final override; private: - string * make_debug_string () FINAL OVERRIDE; + string * make_debug_string () final override; private: rvalue *m_min_value; @@ -2263,13 +2263,13 @@ public: int num_cases, case_ **cases); - void replay_into (replayer *r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; - vec get_successor_blocks () const FINAL OVERRIDE; + vec get_successor_blocks () const final override; private: - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: rvalue *m_expr; @@ -2300,7 +2300,7 @@ public: virtual void print (pretty_printer *pp) const; private: - string * make_debug_string () FINAL OVERRIDE; + string * make_debug_string () final override; protected: extended_asm *m_ext_asm; @@ -2321,12 +2321,12 @@ public: lvalue *get_lvalue () const { return m_dest; } - void replay_into (replayer *) FINAL OVERRIDE {} + void replay_into (replayer *) final override {} - void print (pretty_printer *pp) const FINAL OVERRIDE; + void print (pretty_printer *pp) const final override; private: - void write_reproducer (reproducer &r) FINAL OVERRIDE; + void write_reproducer (reproducer &r) final override; private: lvalue *m_dest; @@ -2345,12 +2345,12 @@ public: rvalue *get_rvalue () const { return m_src; } - void replay_into (replayer *) FINAL OVERRIDE {} + void replay_into (replayer *) final override {} - void print (pretty_printer *pp) const FINAL OVERRIDE; + void print (pretty_printer *pp) const final override; private: - void write_reproducer (reproducer &r) FINAL OVERRIDE; + void write_reproducer (reproducer &r) final override; private: rvalue *m_src; @@ -2381,7 +2381,7 @@ public: rvalue *src); void add_clobber (const char *victim); - void replay_into (replayer *r) OVERRIDE; + void replay_into (replayer *r) override; string *get_asm_template () const { return m_asm_template; } @@ -2393,7 +2393,7 @@ protected: void write_clobbers (reproducer &r); private: - string * make_debug_string () FINAL OVERRIDE; + string * make_debug_string () final override; virtual void maybe_populate_playback_blocks (auto_vec *out) = 0; @@ -2418,13 +2418,13 @@ public: : extended_asm (b, loc, asm_template) {} - void write_reproducer (reproducer &r) OVERRIDE; - bool is_goto () const FINAL OVERRIDE { return false; } - void maybe_print_gotos (pretty_printer *) const FINAL OVERRIDE {} + void write_reproducer (reproducer &r) override; + bool is_goto () const final override { return false; } + void maybe_print_gotos (pretty_printer *) const final override {} private: void maybe_populate_playback_blocks - (auto_vec *) FINAL OVERRIDE + (auto_vec *) final override {} }; @@ -2441,17 +2441,17 @@ public: block **goto_blocks, block *fallthrough_block); - void replay_into (replayer *r) FINAL OVERRIDE; - void write_reproducer (reproducer &r) OVERRIDE; + void replay_into (replayer *r) final override; + void write_reproducer (reproducer &r) override; - vec get_successor_blocks () const FINAL OVERRIDE; + vec get_successor_blocks () const final override; - bool is_goto () const FINAL OVERRIDE { return true; } - void maybe_print_gotos (pretty_printer *) const FINAL OVERRIDE; + bool is_goto () const final override { return true; } + void maybe_print_gotos (pretty_printer *) const final override; private: void maybe_populate_playback_blocks - (auto_vec *out) FINAL OVERRIDE; + (auto_vec *out) final override; private: auto_vec m_goto_blocks; @@ -2466,12 +2466,12 @@ class top_level_asm : public memento public: top_level_asm (context *ctxt, location *loc, string *asm_stmts); - void write_to_dump (dump &d) FINAL OVERRIDE; + void write_to_dump (dump &d) final override; private: - void replay_into (replayer *r) FINAL OVERRIDE; - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: location *m_loc; @@ -2484,12 +2484,12 @@ public: global_init_rvalue (context *ctxt, lvalue *variable, rvalue *init) : memento (ctxt), m_variable (variable), m_init (init) {}; - void write_to_dump (dump &d) FINAL OVERRIDE; + void write_to_dump (dump &d) final override; private: - void replay_into (replayer *r) FINAL OVERRIDE; - string * make_debug_string () FINAL OVERRIDE; - void write_reproducer (reproducer &r) FINAL OVERRIDE; + void replay_into (replayer *r) final override; + string * make_debug_string () final override; + void write_reproducer (reproducer &r) final override; private: lvalue *m_variable; diff --git a/gcc/json.h b/gcc/json.h index 9ab6a5b..f272981 100644 --- a/gcc/json.h +++ b/gcc/json.h @@ -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; diff --git a/gcc/read-rtl-function.cc b/gcc/read-rtl-function.cc index 49c8880..eacbe4c 100644 --- a/gcc/read-rtl-function.cc +++ b/gcc/read-rtl-function.cc @@ -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); diff --git a/gcc/tree-complex.cc b/gcc/tree-complex.cc index 42db96a..f722057 100644 --- a/gcc/tree-complex.cc +++ b/gcc/tree-complex.cc @@ -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_values; diff --git a/gcc/tree-diagnostic-path.cc b/gcc/tree-diagnostic-path.cc index ea16bfa..4aa6944 100644 --- a/gcc/tree-diagnostic-path.cc +++ b/gcc/tree-diagnostic-path.cc @@ -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); diff --git a/gcc/tree-ssa-ccp.cc b/gcc/tree-ssa-ccp.cc index 262a247e..81c9767 100644 --- a/gcc/tree-ssa-ccp.cc +++ b/gcc/tree-ssa-ccp.cc @@ -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 diff --git a/gcc/tree-ssa-copy.cc b/gcc/tree-ssa-copy.cc index 7d636ec..050a6d1 100644 --- a/gcc/tree-ssa-copy.cc +++ b/gcc/tree-ssa-copy.cc @@ -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. */ diff --git a/gcc/tree-vrp.cc b/gcc/tree-vrp.cc index 77c1912..0784d65 100644 --- a/gcc/tree-vrp.cc +++ b/gcc/tree-vrp.cc @@ -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) diff --git a/gcc/value-query.h b/gcc/value-query.h index 78e2d1b..cf1a1d7 100644 --- a/gcc/value-query.h +++ b/gcc/value-query.h @@ -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; diff --git a/gcc/vr-values.h b/gcc/vr-values.h index f294417..7a377ce 100644 --- a/gcc/vr-values.h +++ b/gcc/vr-values.h @@ -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, diff --git a/libcpp/lex.cc b/libcpp/lex.cc index fb1dfab..f891d3e 100644 --- a/libcpp/lex.cc +++ b/libcpp/lex.cc @@ -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]. */ -- cgit v1.1