hubert.reinterpretcast added inline comments.

================
Comment at: clang/test/CodeGen/init.c:197
   // CHECK-LABEL: @nonzeroPaddedUnionMemset(
-  // CHECK-NOT: store
-  // CHECK-NOT: memcpy
-  // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 -16, i32 36, i1 
false)
+  // CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 {{.*}}, i8* align 
4 {{.*}} [[INIT_PADDEDUNION]], {{.*}}, i32 36, i1 false)
 }
----------------
This is C++ aggregate initialization and not value-initialization. The wording 
you quoted from the C++ standard is for zero-initialization, which might be 
part of value initialization, but you have not shown that aggregate 
initialization of a union involves zero-initialization of that union.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68115



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to