Skip to content

Commit

Permalink
[clang][dataflow] Eliminate uses of RecordValue::getChild(). (#65329)
Browse files Browse the repository at this point in the history
We want to work towards eliminating the `RecordStorageLocation` from
`RecordValue`. These particular uses of `RecordValue::getChild()` can
simply
be replaced with `RecordStorageLocation::getChild()`.
  • Loading branch information
martinboehme committed Sep 6, 2023
1 parent a479be0 commit f470c36
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2860,11 +2860,11 @@ TEST(TransferTest, AggregateInitialization) {

// Check that fields initialized in an initializer list are always
// modeled in other instances of the same type.
const auto &OtherBVal =
getValueForDecl<RecordValue>(ASTCtx, Env, "OtherB");
EXPECT_THAT(OtherBVal.getChild(*BarDecl), NotNull());
EXPECT_THAT(OtherBVal.getChild(*BazDecl), NotNull());
EXPECT_THAT(OtherBVal.getChild(*QuxDecl), NotNull());
const auto &OtherBLoc =
getLocForDecl<RecordStorageLocation>(ASTCtx, Env, "OtherB");
EXPECT_THAT(OtherBLoc.getChild(*BarDecl), NotNull());
EXPECT_THAT(OtherBLoc.getChild(*BazDecl), NotNull());
EXPECT_THAT(OtherBLoc.getChild(*QuxDecl), NotNull());
});
}
}
Expand Down

0 comments on commit f470c36

Please sign in to comment.