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

Pavel Samolysov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 05:45:40 PDT 2022


psamolysov added inline comments.


================
Comment at: llvm/unittests/DebugInfo/LogicalView/LocationRangesTest.cpp:58
+    T *Element = new T();
+    EXPECT_NE(Element, nullptr);
+    return Element;
----------------
A `std::bad_alloc` will be thrown if the test is out of memory. It makes sense to wrap the line in the `try-catch` block or use the non-throwing overload of the `new` operator.


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