[PATCH] D158488: [NFC] Initialize member pointers to nullptr.

Tom Honermann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 22 08:36:35 PDT 2023


tahonermann accepted this revision.
tahonermann added a comment.
This revision is now accepted and ready to land.

Looks good to me.



================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:934
   // Return value of the runtime offloading call.
-  Value *Return;
+  Value *Return = nullptr;
 
----------------
aaron.ballman wrote:
> This is necessary to initialize because `emitTargetKernel()` has an early return which does not initialize the passed reference to this object.
`Return` is passed to `Builder.CreateIsNotNull()`. I briefly inspected and it looks like it handles a null argument, so I agree this looks like the right fix.


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

https://reviews.llvm.org/D158488



More information about the cfe-commits mailing list