[PATCH] D63161: Devirtualize destructor of final class.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 20 14:00:06 PDT 2019
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Thanks! Minor comment then feel free to commit.
================
Comment at: lib/CodeGen/CGExprCXX.cpp:1877
+ DevirtualizedDtor->getParent();
+ if (getCXXRecord(Base) == DevirtualizedClass) {
+ // Devirtualized to the class of the base type (the type of the
----------------
There's no guarantee that you get the same declaration of the class in both cases; use `declaresSameEntity` here instead of `==` to compare whether you have the same class.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63161/new/
https://reviews.llvm.org/D63161
More information about the cfe-commits
mailing list