fix(kernel/replace): make it more robust, and add clear method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
87eb254a1a
commit
be8fe1b902
1 changed files with 6 additions and 0 deletions
|
@ -47,6 +47,8 @@ class replace_fn {
|
|||
P m_post;
|
||||
|
||||
expr apply(expr const & e, unsigned offset) {
|
||||
if (!e)
|
||||
return e;
|
||||
bool sh = false;
|
||||
if (is_shared(e)) {
|
||||
expr_cell_offset p(e.raw(), offset);
|
||||
|
@ -102,5 +104,9 @@ public:
|
|||
expr operator()(expr const & e) {
|
||||
return apply(e, 0);
|
||||
}
|
||||
|
||||
void clear() {
|
||||
m_cache.clear();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue