njames93 added a comment.

Can you add test cases where there is a struct with an anonymous union and 
another field that does need an initializer, just to verify warning and fixit 
behaviour.

  struct S3 {
    S3() {}
    int A;
    union {
      int B;
      int C = 0; // Possibly a case where this is initialized in the member 
init list.
    };
  };



================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:186-188
+- Fixed a false positive in :doc:`cppcoreguidelines-pro-type-member-init
+  <clang-tidy/checks/cppcoreguidelines/pro-type-member-init>` when any member
+  of the anonymous union has been initialized.
----------------
Can't think of the nicest way to say this, but I think this is a little more 
understandable.


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

https://reviews.llvm.org/D127293

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

Reply via email to