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

Dmitry Yanovsky via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 13:21:18 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) {
----------------
kerambyte wrote:

No worries at all, unfortunately I don't have commit access, so if you could merge this fix for me please that'd be great 👍 

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


More information about the llvm-commits mailing list