[llvm] [ADT] Fix a minor build error (PR #104840)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 13:16:12 PDT 2024


================
@@ -316,7 +316,7 @@ TEST(UniqueFunctionTest, InlineStorageWorks) {
   // We do assume a couple of implementation details of the unique_function here:
   //  - It can store certain small-enough payload inline
   //  - Inline storage size is at least >= sizeof(void*)
-  void *ptr;
+  void *ptr = nullptr;
   unique_function<void(void *)> UniqueFunctionWithInlineStorage{
       [ptr](void *self) {
----------------
kuhar wrote:

address of a reference is the underlying pointer

https://github.com/llvm/llvm-project/pull/104840


More information about the llvm-commits mailing list