https://llvm.org/bugs/show_bug.cgi?id=31715
Bug ID: 31715 Summary: Explicit destructor call type agreement inconsistently enforced with template-ids and qualified-ids Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: david_w...@me.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified Clang forbids base-class destructor calls on derived objects, except when the base is named by a template-id or a qualified-id. template< typename > struct b { ~ b () {} }; typedef b< int > q; struct a : q {}; int main() { a x; x.~b< int >(); // Allowed x.q::~q(); // Allowed x.~q(); // Error } Also, what standard rule is being diagnosed? [class.dtor]/14 says, "The invocation of a destructor is subject to the usual rules for member functions…" and the example there has similar cases of base-destructor invocation, which Clang does allow, one of which uses a qualified-id. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs