Skip to content

Commit 9b94869

Browse files
[memprof] Use front instead of begin in a unit test (NFC) (#119501)
"front" allows us to drop a dereference.
1 parent 92bf1aa commit 9b94869

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/unittests/ProfileData/MemProfTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ TEST(MemProf, YAMLParser) {
748748

749749
// Verify the entire contents of MemProfData.Records.
750750
ASSERT_THAT(MemProfData.Records, SizeIs(1));
751-
const auto &[GUID, Record] = *MemProfData.Records.begin();
751+
const auto &[GUID, Record] = MemProfData.Records.front();
752752
EXPECT_EQ(GUID, 0xdeadbeef12345678ULL);
753753
ASSERT_THAT(Record.AllocSites, SizeIs(2));
754754
EXPECT_EQ(Record.AllocSites[0].CSId, hashCallStack(CS1));

0 commit comments

Comments
 (0)