Skip to content

Commit b2a6821

Browse files
ymandmartinboehme
andauthored
Update clang/lib/Analysis/FlowSensitive/Value.cpp
Co-authored-by: martinboehme <[email protected]>
1 parent 3524e2b commit b2a6821

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/lib/Analysis/FlowSensitive/Value.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ static bool areEquivalentIndirectionValues(const Value &Val1,
2727
}
2828

2929
bool areEquivalentValues(const Value &Val1, const Value &Val2) {
30+
if (&Val1 == &Val2) return true;
31+
if (Val1.getKind() != Val2.getKind()) return false;
3032
// If values are distinct and have properties, we don't consider them equal,
3133
// leaving equality up to the user model.
32-
return &Val1 == &Val2 ||
33-
(Val1.getKind() == Val2.getKind() &&
34-
(Val1.properties().empty() && Val2.properties().empty()) &&
35-
(isa<TopBoolValue>(&Val1) ||
36-
areEquivalentIndirectionValues(Val1, Val2)));
34+
if (!Val1.properties().empty() || !Val2.properties().empty()) return false;
35+
if (isa<TopBoolValue>(&Val1)) return true;
36+
return areEquivalentIndirectionValues(Val1, Val2);
3737
}
3838

3939
raw_ostream &operator<<(raw_ostream &OS, const Value &Val) {

0 commit comments

Comments
 (0)