dwarf-reader: fix recursion in expr_result::operator&

operator& was implemented in terms of itself, leading to infinite
recursion. Fix that by implementing it in terms of &='ing the const
value. That is consistent with all other ?= operators.

 * src/abg-dwarf-reader.cc: fix expr_result::operator&

Signed-off-by: Matthias Maennich <maennich@google.com>
This commit is contained in:
Matthias Maennich via libabigail 2019-04-15 18:05:22 +01:00 committed by Dodji Seketeli
parent 573995d1f5
commit 90c32a8df5

View File

@ -2626,7 +2626,7 @@ public:
operator&(const expr_result& o)
{
expr_result r(*this);
r.const_value_ = *this & o;
r.const_value_ &= o.const_value_;
r.is_const_ = r.is_const_ && o.is_const_;
return r;
}