[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 24 17:40:32 PDT 2018


Quuxplusone added inline comments.


================
Comment at: test/CodeGen/init.c:202
+  union U { char c; int i; };
+  struct S { union U u; int i; };
+  struct S arr[5] = { { {0xF0}, 0xF0F0F0F0 }, { {0xF0}, 0xF0F0F0F0 }, { {0xF0}, 0xF0F0F0F0 }, { {0xF0}, 0xF0F0F0F0 }, { {0xF0}, 0xF0F0F0F0 }, };
----------------
Drive-by suggestion: If you make this `struct S { union U u; short s; };` then you'll also be testing the case of "padding between struct fields", which is otherwise untested here.


Repository:
  rC Clang

https://reviews.llvm.org/D49771





More information about the cfe-commits mailing list