Skip to content

Commit 9700301

Browse files
Merge pull request #4705 from romainbrenguier/bugfix/object-map-equality
Fix use of equality of value_sett::object_mapt
2 parents 03833b2 + b27ceb9 commit 9700301

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/pointer-analysis/value_set.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,12 @@ class value_sett
221221

222222
bool operator==(const entryt &other) const
223223
{
224-
return
225-
identifier==other.identifier &&
226-
suffix==other.suffix &&
227-
object_map==other.object_map;
224+
// Note that the object_map comparison below is duplicating the code of
225+
// operator== defined in reference_counting.h because old versions of
226+
// clang (3.7 and 3.8) do not resolve the template instantiation correctly
227+
return identifier == other.identifier && suffix == other.suffix &&
228+
(object_map.get_d() == other.object_map.get_d() ||
229+
object_map.read() == other.object_map.read());
228230
}
229231
bool operator!=(const entryt &other) const
230232
{

0 commit comments

Comments
 (0)