https://github.com/steakhal created 
https://github.com/llvm/llvm-project/pull/157657

This is just more conventional.

>From f0b70959750f94d5943d30efc79106ae5063265e Mon Sep 17 00:00:00 2001
From: Balazs Benics <benicsbal...@gmail.com>
Date: Tue, 9 Sep 2025 12:52:40 +0200
Subject: [PATCH] [analyzer][NFC] Rename LivenessValues::equals to
 LivenessValues::operator==

This is just more conventional.
---
 clang/include/clang/Analysis/Analyses/LiveVariables.h | 2 +-
 clang/lib/Analysis/LiveVariables.cpp                  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

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;

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to