ahatanak added a comment.

In https://reviews.llvm.org/D45898#1104025, @rsmith wrote:

> As it happens, the C++ committee fixed the language wording hole here very 
> recently. The new rule can be found here: http://wg21.link/p0968r0#2227
>  In summary: we should to consider the destructor for all elements of the 
> aggregate to be potentially-invoked.


It doesn't mean that clang should reject the following code, does it?

  // This should compile fine as long as 'Deleted7d d7d' is commented out.
  struct DeletedDtor { ~DeletedDtor() = delete; };
  struct Deleted7d { DeletedDtor a = {}; }; 
  //Deleted7d d7d;

I tried making a helper function out of the code in SK_UserConversion and using 
it in "case SK_ListInitialization". That doesn't seem to work because 
DiagnoseUseOfDecl rejects the code (with error message "error: attempt to use a 
deleted function") above even though the destructor isn't needed (because 'd7d' 
is commented out), so I guess that check should be done in another place.


Repository:
  rC Clang

https://reviews.llvm.org/D45898



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D45898: [... Akira Hatanaka via Phabricator via cfe-commits
    • [PATCH] D458... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D458... John McCall via Phabricator via cfe-commits
    • [PATCH] D458... Akira Hatanaka via Phabricator via cfe-commits

Reply via email to