Skip to content

Commit 2194d6d

Browse files
authored
[analyzer][NFC] Rename LivenessValues::equals to LivenessValues::operator== (#157657)
This is just more conventional.
1 parent 513d9cd commit 2194d6d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/include/clang/Analysis/Analyses/LiveVariables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class LiveVariables : public ManagedAnalysis {
3434
llvm::ImmutableSet<const VarDecl *> liveDecls;
3535
llvm::ImmutableSet<const BindingDecl *> liveBindings;
3636

37-
bool equals(const LivenessValues &V) const;
37+
bool operator==(const LivenessValues &V) const;
3838

3939
LivenessValues()
4040
: liveExprs(nullptr), liveDecls(nullptr), liveBindings(nullptr) {}

clang/lib/Analysis/LiveVariables.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ LiveVariablesImpl::merge(LiveVariables::LivenessValues valsA,
127127
BSetRefA.asImmutableSet());
128128
}
129129

130-
bool LiveVariables::LivenessValues::equals(const LivenessValues &V) const {
130+
bool LiveVariables::LivenessValues::operator==(const LivenessValues &V) const {
131131
return liveExprs == V.liveExprs && liveDecls == V.liveDecls &&
132132
liveBindings == V.liveBindings;
133133
}
@@ -598,7 +598,7 @@ LiveVariables::computeLiveness(AnalysisDeclContext &AC, bool killAtAssign) {
598598

599599
if (!everAnalyzedBlock[block->getBlockID()])
600600
everAnalyzedBlock[block->getBlockID()] = true;
601-
else if (prevVal.equals(val))
601+
else if (prevVal == val)
602602
continue;
603603

604604
prevVal = val;

0 commit comments

Comments
 (0)