rjmccall added a comment.

All of the IRGen changes in this patch are unnecessary according to the model 
we've worked out, right?  The fix is just to mark the destructor as still used 
when we're constructing an array.



================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:13119
+  // variable is static local array and exceptions are enabled, since then we
+  // need to clean up the elements.
+  if (VD->isNoDestroy(getASTContext()) &&
----------------
This isn't "emitting" the destructor, it's "using" it.  Also, the comment 
should make it clear that this is about aggregate initialization in general, 
and it should contain a FIXME if there's part of that rule we're not 
implementing correctly.


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

https://reviews.llvm.org/D61165



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

Reply via email to