Skip to content

Commit f470c36

Browse files
authored
[clang][dataflow] Eliminate uses of RecordValue::getChild(). (llvm#65329)
We want to work towards eliminating the `RecordStorageLocation` from `RecordValue`. These particular uses of `RecordValue::getChild()` can simply be replaced with `RecordStorageLocation::getChild()`.
1 parent a479be0 commit f470c36

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/unittests/Analysis/FlowSensitive/TransferTest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2860,11 +2860,11 @@ TEST(TransferTest, AggregateInitialization) {
28602860

28612861
// Check that fields initialized in an initializer list are always
28622862
// modeled in other instances of the same type.
2863-
const auto &OtherBVal =
2864-
getValueForDecl<RecordValue>(ASTCtx, Env, "OtherB");
2865-
EXPECT_THAT(OtherBVal.getChild(*BarDecl), NotNull());
2866-
EXPECT_THAT(OtherBVal.getChild(*BazDecl), NotNull());
2867-
EXPECT_THAT(OtherBVal.getChild(*QuxDecl), NotNull());
2863+
const auto &OtherBLoc =
2864+
getLocForDecl<RecordStorageLocation>(ASTCtx, Env, "OtherB");
2865+
EXPECT_THAT(OtherBLoc.getChild(*BarDecl), NotNull());
2866+
EXPECT_THAT(OtherBLoc.getChild(*BazDecl), NotNull());
2867+
EXPECT_THAT(OtherBLoc.getChild(*QuxDecl), NotNull());
28682868
});
28692869
}
28702870
}

0 commit comments

Comments
 (0)