[clang] 2194d6d - [analyzer][NFC] Rename LivenessValues::equals to LivenessValues::operator== (#157657)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 9 05:39:27 PDT 2025
Author: Balazs Benics
Date: 2025-09-09T14:39:24+02:00
New Revision: 2194d6d07f85184584335dcae0420e556140922a
URL: https://github.com/llvm/llvm-project/commit/2194d6d07f85184584335dcae0420e556140922a
DIFF: https://github.com/llvm/llvm-project/commit/2194d6d07f85184584335dcae0420e556140922a.diff
LOG: [analyzer][NFC] Rename LivenessValues::equals to LivenessValues::operator== (#157657)
This is just more conventional.
Added:
Modified:
clang/include/clang/Analysis/Analyses/LiveVariables.h
clang/lib/Analysis/LiveVariables.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Analysis/Analyses/LiveVariables.h b/clang/include/clang/Analysis/Analyses/LiveVariables.h
index 8a3dd0c35e64c..480a63cbb8b32 100644
--- a/clang/include/clang/Analysis/Analyses/LiveVariables.h
+++ b/clang/include/clang/Analysis/Analyses/LiveVariables.h
@@ -34,7 +34,7 @@ class LiveVariables : public ManagedAnalysis {
llvm::ImmutableSet<const VarDecl *> liveDecls;
llvm::ImmutableSet<const BindingDecl *> liveBindings;
- bool equals(const LivenessValues &V) const;
+ bool operator==(const LivenessValues &V) const;
LivenessValues()
: liveExprs(nullptr), liveDecls(nullptr), liveBindings(nullptr) {}
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp
index db88d4f7ee0f7..dee7fb275c8f3 100644
--- a/clang/lib/Analysis/LiveVariables.cpp
+++ b/clang/lib/Analysis/LiveVariables.cpp
@@ -127,7 +127,7 @@ LiveVariablesImpl::merge(LiveVariables::LivenessValues valsA,
BSetRefA.asImmutableSet());
}
-bool LiveVariables::LivenessValues::equals(const LivenessValues &V) const {
+bool LiveVariables::LivenessValues::operator==(const LivenessValues &V) const {
return liveExprs == V.liveExprs && liveDecls == V.liveDecls &&
liveBindings == V.liveBindings;
}
@@ -598,7 +598,7 @@ LiveVariables::computeLiveness(AnalysisDeclContext &AC, bool killAtAssign) {
if (!everAnalyzedBlock[block->getBlockID()])
everAnalyzedBlock[block->getBlockID()] = true;
- else if (prevVal.equals(val))
+ else if (prevVal == val)
continue;
prevVal = val;
More information about the cfe-commits
mailing list