analyzer: introduce noop_region_model_context
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 17 Mar 2020 18:43:43 +0000 (14:43 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 18 Mar 2020 13:56:49 +0000 (09:56 -0400)
commit7d9c107ab1eab331e7011513b11e26b78850d614
treeec08870a947171b41c74f6b160abd2fc38fae36a
parent0db2cd177020920e187ef47791d52cf689133a25
analyzer: introduce noop_region_model_context

tentative_region_model_context and test_region_model_context are both
forced to implement numerous pure virtual vfuncs of the abstract
region_model_context.

This patch adds a noop_region_model_context which provides empty
implementations of all of region_model_context's pure virtual functions,
and subclasses the above classes from that, rather than from
region_model_context directly.

gcc/analyzer/ChangeLog:
* region-model.h (class noop_region_model_context): New subclass
of region_model_context.
(class tentative_region_model_context): Inherit from
noop_region_model_context rather than from region_model_context;
drop redundant vfunc implementations.
(class test_region_model_context): Likewise.
gcc/analyzer/ChangeLog
gcc/analyzer/region-model.h