[PATCH] D72897: List implicit operator== after implicit destructors in a vtable.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 16 21:39:15 PST 2020


rjmccall added a comment.

I see two reasonable approaches here: we can rely on the implicit members being added in the right order by Sema, as this patch seems to do, or we can broaden the special treatment of implicit virtual functions in the v-table layout code.  The latter is more complex (we'd basically need to collect and sort all the implicit virtual functions), but it reliably isolates the ABI from implementation decisions like the order in which Sema processes implicit members and whether some lookup might have triggered an implicit declaration at a point we didn't expect.

I know that Sema used to have a lot of issues with implicitly declaring special members, but I also know that that was bound up with how we tracked special state for the class, and that code has changed a lot.   If you feel that that's an unlikely problem now, and you're comfortable with potentially having to generate implicit declarations of special members in different orders to satisfy different ABIs, I can accept this approach.  (It would be good to know what order MSVC will emit these members in, though.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72897





More information about the cfe-commits mailing list