Skip to content

Commit ab74a31

Browse files
authored
[NFC] [FlowSensitive] LatticeJoinEffect -> LatticeEffect (#160222)
`LatticeJoinEffect` is deprecated.
1 parent 9d48df7 commit ab74a31

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

clang/include/clang/Analysis/FlowSensitive/CachedConstAccessorsLattice.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ template <typename Base> class CachedConstAccessorsLattice : public Base {
9090
return Base::operator==(Other);
9191
}
9292

93-
LatticeJoinEffect join(const CachedConstAccessorsLattice &Other);
93+
LatticeEffect join(const CachedConstAccessorsLattice &Other);
9494

9595
private:
9696
// Maps a record storage location and const method to the value to return
@@ -127,15 +127,15 @@ joinConstMethodMap(
127127
for (auto &[Loc, DeclToT] : Map1) {
128128
auto It = Map2.find(Loc);
129129
if (It == Map2.end()) {
130-
Effect = LatticeJoinEffect::Changed;
130+
Effect = LatticeEffect::Changed;
131131
continue;
132132
}
133133
const auto &OtherDeclToT = It->second;
134134
auto &JoinedDeclToT = Result[Loc];
135135
for (auto [Func, Var] : DeclToT) {
136136
T *OtherVar = OtherDeclToT.lookup(Func);
137137
if (OtherVar == nullptr || OtherVar != Var) {
138-
Effect = LatticeJoinEffect::Changed;
138+
Effect = LatticeEffect::Changed;
139139
continue;
140140
}
141141
JoinedDeclToT.insert({Func, Var});

clang/unittests/Analysis/FlowSensitive/CachedConstAccessorsLatticeTest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ using ast_matchers::selectFirst;
4242

4343
using dataflow::DataflowAnalysisContext;
4444
using dataflow::Environment;
45-
using dataflow::LatticeJoinEffect;
45+
using dataflow::LatticeEffect;
4646
using dataflow::RecordStorageLocation;
4747
using dataflow::Value;
4848
using dataflow::WatchedLiteralsSolver;
@@ -270,11 +270,11 @@ TEST_F(CachedConstAccessorsLatticeTest, JoinSameNoop) {
270270

271271
LatticeT EmptyLattice;
272272
LatticeT EmptyLattice2;
273-
EXPECT_EQ(EmptyLattice.join(EmptyLattice2), LatticeJoinEffect::Unchanged);
273+
EXPECT_EQ(EmptyLattice.join(EmptyLattice2), LatticeEffect::Unchanged);
274274

275275
LatticeT Lattice1;
276276
Lattice1.getOrCreateConstMethodReturnValue(Loc, CE, Env);
277-
EXPECT_EQ(Lattice1.join(Lattice1), LatticeJoinEffect::Unchanged);
277+
EXPECT_EQ(Lattice1.join(Lattice1), LatticeEffect::Unchanged);
278278
}
279279

280280
TEST_F(CachedConstAccessorsLatticeTest, ProducesNewValueAfterJoinDistinct) {
@@ -289,7 +289,7 @@ TEST_F(CachedConstAccessorsLatticeTest, ProducesNewValueAfterJoinDistinct) {
289289

290290
LatticeT EmptyLattice;
291291

292-
EXPECT_EQ(Lattice1.join(EmptyLattice), LatticeJoinEffect::Changed);
292+
EXPECT_EQ(Lattice1.join(EmptyLattice), LatticeEffect::Changed);
293293
Value *ValAfterJoin =
294294
Lattice1.getOrCreateConstMethodReturnValue(Loc, CE, Env);
295295

@@ -299,7 +299,7 @@ TEST_F(CachedConstAccessorsLatticeTest, ProducesNewValueAfterJoinDistinct) {
299299
LatticeT Lattice3;
300300
Value *Val3 = Lattice3.getOrCreateConstMethodReturnValue(Loc, CE, Env);
301301

302-
EXPECT_EQ(Lattice1.join(Lattice3), LatticeJoinEffect::Changed);
302+
EXPECT_EQ(Lattice1.join(Lattice3), LatticeEffect::Changed);
303303
Value *ValAfterJoin2 =
304304
Lattice1.getOrCreateConstMethodReturnValue(Loc, CE, Env);
305305

0 commit comments

Comments
 (0)