diff options
author | David Malcolm <dmalcolm@redhat.com> | 2020-02-20 08:44:23 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2020-03-04 16:58:34 -0500 |
commit | 3c1645a379e405c7ce33060846fa424373b1f5f4 (patch) | |
tree | d15cebb76591ee00442da33d42fd40dfe18d3712 /gcc/tree-ssa-strlen.c | |
parent | 4ac3eb5c5f157bea22b5ae34b0df254d729dac25 (diff) | |
download | gcc-3c1645a379e405c7ce33060846fa424373b1f5f4.zip gcc-3c1645a379e405c7ce33060846fa424373b1f5f4.tar.gz gcc-3c1645a379e405c7ce33060846fa424373b1f5f4.tar.bz2 |
analyzer: validate region subclasses
This patch converts region::validate to a vfunc, implementing
additional checking per subclass: verifying that various
region_id fields within map_region, array_region, stack_region and
root_region are valid, rather than just those within the base class.
Doing so caught bugs earlier in follow-up work I have on
canonicalization and purging of region_model.
gcc/analyzer/ChangeLog:
* region-model.cc (region::validate): Convert model param from ptr
to reference. Update comment to reflect that it's now a vfunc.
(map_region::validate): New vfunc implementation.
(array_region::validate): New vfunc implementation.
(stack_region::validate): New vfunc implementation.
(root_region::validate): New vfunc implementation.
(region_model::validate): Pass a reference rather than a pointer
to the region::validate vfunc.
* region-model.h (region::validate): Make virtual. Convert model
param from ptr to reference.
(map_region::validate): New vfunc decl.
(array_region::validate): New vfunc decl.
(stack_region::validate): New vfunc decl.
(root_region::validate): New vfunc decl.
Diffstat (limited to 'gcc/tree-ssa-strlen.c')
0 files changed, 0 insertions, 0 deletions