Skip to content

Commit 141b959

Browse files
[memprof] Use front instead of begin in a unit test (NFC)
"front" allows us to drop a dereference.
1 parent 3146d57 commit 141b959

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
@@ -747,7 +747,7 @@ TEST(MemProf, YAMLParser) {
747747

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

0 commit comments

Comments
 (0)