jfb added a comment. In D61165#1479937 <https://reviews.llvm.org/D61165#1479937>, @rjmccall wrote:
> Are you sure these are the right semantics for `nodestroy`? I think there's > a reasonable argument that we should not destroy previous elements of a > `nodestroy` array just because an element constructor throws. It's basically > academic for true globals because the exception will terminate the process > anyway, and even for `thread_local`s and `static` locals (where I believe the > exception is theoretically recoverable) it's at least arguable that we should > either decline to destroy (possibly causing leaks) or simply call > `std::terminate`. I think `std::terminate` makes the most sense. Getting teardown correctly is always tricky, and I'm willing to bet that teardown caused by an exception in construction of an array is even harder and done wrong. Repository: rC Clang 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