[PATCH] D157332: [clang] Make init for empty no_unique_address fields a no-op write

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 11 14:43:04 PDT 2023


efriedma added a comment.

This approach looks fine.



================
Comment at: clang/lib/CodeGen/CGCall.cpp:5781
 
       // If the value is offset in memory, apply the offset now.
+      if (!isEmptyRecord(getContext(), RetTy, true)) {
----------------
The isEmptyRecord call could use a comment briefly explaining that empty records can overlap with other data.

The existing comment about the offset probably belongs inside the if statement.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157332



More information about the cfe-commits mailing list