ahatanak added a comment.

Thanks for fixing this!



================
Comment at: clang/lib/CodeGen/CGNonTrivialStruct.cpp:545
     LValue DstLV, SrcLV;
     if (FD) {
+      // No need to copy zero-length bit-fields.
----------------
Can you add the same check to `GenBinaryFuncName::visitVolatileTrivial` to 
avoid encoding the zero-length bit field into the name of the copy 
constructor/assignment functions? It isn't necessary to generate different 
functions for `ZeroBitfield`in the test case and the following struct:

```
struct S {
  id strong;
};
```


================
Comment at: clang/test/CodeGenObjC/strong-in-c-struct.m:894
+};
+
+void test_zero_bitfield() {
----------------
Can you check that the zero-sized field information isn't encoded into the name 
of the copy assignment function?


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

https://reviews.llvm.org/D76782



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

Reply via email to