aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/svalue.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2022-05-20 10:05:54 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2022-05-20 10:05:54 -0400
commitff171cb13df671a2a0647a68da0fdc1f9a78b8c9 (patch)
tree099c56c115ca15e17c84d4178b546191fdf0b2b1 /gcc/analyzer/svalue.h
parent6c420193e86b39a09304b2845335571eefe24d5d (diff)
downloadgcc-ff171cb13df671a2a0647a68da0fdc1f9a78b8c9.zip
gcc-ff171cb13df671a2a0647a68da0fdc1f9a78b8c9.tar.gz
gcc-ff171cb13df671a2a0647a68da0fdc1f9a78b8c9.tar.bz2
Use "final" and "override" directly, rather than via macros
As of GCC 11 onwards we have required a C++11 compiler, such as GCC 4.8 or later. On the assumption that any such compiler correctly implements "final" and "override", this patch updates the source tree to stop using the FINAL and OVERRIDE macros from ansidecl.h, in favor of simply using "final" and "override" directly. libcpp/ChangeLog: * lex.cc: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". gcc/analyzer/ChangeLog: * analyzer-pass.cc: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * call-info.h: Likewise. * checker-path.h: Likewise. * constraint-manager.cc: Likewise. * diagnostic-manager.cc: Likewise. * engine.cc: Likewise. * exploded-graph.h: Likewise. * feasible-graph.h: Likewise. * pending-diagnostic.h: Likewise. * region-model-impl-calls.cc: Likewise. * region-model.cc: Likewise. * region-model.h: Likewise. * region.h: Likewise. * sm-file.cc: Likewise. * sm-malloc.cc: Likewise. * sm-pattern-test.cc: Likewise. * sm-sensitive.cc: Likewise. * sm-signal.cc: Likewise. * sm-taint.cc: Likewise. * state-purge.h: Likewise. * store.cc: Likewise. * store.h: Likewise. * supergraph.h: Likewise. * svalue.h: Likewise. * trimmed-graph.h: Likewise. * varargs.cc: Likewise. gcc/c-family/ChangeLog: * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * c-pretty-print.h: Likewise. gcc/cp/ChangeLog: * cxx-pretty-print.h: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * error.cc: Likewise. gcc/jit/ChangeLog: * jit-playback.h: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * jit-recording.cc: Likewise. * jit-recording.h: Likewise. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins-base.cc: Replace uses of "FINAL" and "OVERRIDE" with "final" and "override". * config/aarch64/aarch64-sve-builtins-functions.h: Likewise. * config/aarch64/aarch64-sve-builtins-shapes.cc: Likewise. * config/aarch64/aarch64-sve-builtins-sve2.cc: Likewise. * diagnostic-path.h: Likewise. * digraph.cc: Likewise. * gcc-rich-location.h: Likewise. * gimple-array-bounds.cc: Likewise. * gimple-loop-versioning.cc: Likewise. * gimple-range-cache.cc: Likewise. * gimple-range-cache.h: Likewise. * gimple-range-fold.cc: Likewise. * gimple-range-fold.h: Likewise. * gimple-range-tests.cc: Likewise. * gimple-range.h: Likewise. * gimple-ssa-evrp.cc: Likewise. * input.cc: Likewise. * json.h: Likewise. * read-rtl-function.cc: Likewise. * tree-complex.cc: Likewise. * tree-diagnostic-path.cc: Likewise. * tree-ssa-ccp.cc: Likewise. * tree-ssa-copy.cc: Likewise. * tree-vrp.cc: Likewise. * value-query.h: Likewise. * vr-values.h: Likewise. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/analyzer/svalue.h')
-rw-r--r--gcc/analyzer/svalue.h178
1 files changed, 89 insertions, 89 deletions
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; }