[PATCH] D98589: [llvm] [dwarf] Fix DWARFListTableHeader::getOffsetEntry off-by-one
Jan Kratochvil via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 14 13:44:26 PDT 2021
jankratochvil marked an inline comment as done.
jankratochvil added inline comments.
================
Comment at: llvm/unittests/DebugInfo/DWARF/DWARFListTableTest.cpp:95-96
+ Optional<uint64_t> Offset0 = Header.getOffsetEntry(Extractor, 0);
+ EXPECT_TRUE(!!Offset0);
+ EXPECT_EQ(*Offset0, uint64_t(4));
+ Optional<uint64_t> Offset1 = Header.getOffsetEntry(Extractor, 1);
----------------
labath wrote:
> I think `EXPECT_EQ(Offset0, uint64_t(4));` (note missing `*`) should be enough.
Nice, I did not know (even `std::optional`).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98589/new/
https://reviews.llvm.org/D98589
More information about the llvm-commits
mailing list