[PATCH] D125779: [llvm-dva] 04 - Locations and ranges

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 1 01:28:14 PDT 2022


CarlosAlbertoEnciso added inline comments.


================
Comment at: llvm/unittests/DebugInfo/LogicalView/LocationRangesTest.cpp:94
+  Element->setType(Type);
+  EXPECT_STREQ(Element->getName().data(), Name.data());
+  EXPECT_EQ(Element->getOffset(), Offset);
----------------
psamolysov wrote:
> There is an overload of the `operator==` for two `StringRef`s, so there is no needs in `EXPECT_STREQ`, moreover the `data()` method of `StringRef` doesn't guarantee that the returned string will be null terminated.
Changed to `EXPECT_EQ(Element->getName(), Name);`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125779/new/

https://reviews.llvm.org/D125779



More information about the llvm-commits mailing list