[PATCH] D53860: [SemaCXX] Don't check base's dtor is accessible
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 30 11:19:22 PDT 2018
ahatanak added a comment.
http://wg21.link/p0968r0#2227 says:
The destructor for each element of class type is potentially invoked (15.4 [class.dtor]) from the context where the aggregate initialization occurs. [Note: This provision ensures that destructors can be called for fully-constructed subobjects in case an exception is thrown (18.2 [except.ctor]). —end note]
And '15.4 Destructors' has this sentence:
A program is ill-formed if a destructor that is potentially invoked is deleted or not accessible from the context of the invocation.
I'm not sure what "context" is in the case above (foo or Derived?), but if it's foo, it seems like clang is correct.
Repository:
rC Clang
https://reviews.llvm.org/D53860
More information about the cfe-commits
mailing list