[PATCH] D45898: [SemaCXX] Mark destructor as referenced
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 17 19:02:15 PDT 2018
ahatanak added a comment.
Richard and Doug, do you have any thoughts on John's suggestion?
================
Comment at: test/CodeGenObjCXX/arc-list-init-destruct.mm:1
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.13.0 -std=c++1z -fobjc-arc -fobjc-exceptions -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s
+
----------------
rjmccall wrote:
> Does the corresponding C++ test case (replacing `Class0 *f;` with `HasExplicitNonTrivialDestructor f;`) not reproduce the problem?
I wasn't able to reproduce the problem by changing the type of field 'f' to a C++ class with a non-trivial destructor because, if I make that change, Class1's destructor declaration gets added in Sema::AddImplicitlyDeclaredMembersToClass. I don't fully understand the reason behind it, but Class1's destructor declaration is added when the type of one of its subobject has a user-declared destructor.
Repository:
rC Clang
https://reviews.llvm.org/D45898
More information about the cfe-commits
mailing list