[PATCH] D126194: [Concepts] Implement overload resolution for destructors (P0848)
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 23 06:54:20 PDT 2022
cor3ntin added a comment.
In D126194#3531267 <https://reviews.llvm.org/D126194#3531267>, @erichkeane wrote:
> How much of P0848 is missing after this? If nothing/not much, should we update cxx_status.html as well?
P0848 applies to all special member function. At best we could mark it partial but most of the work still need to be done.
I gave a shot to P0848 a few months ago, but my assesment is that clang might have to significantly refactor of special member functions to do that cleanly
================
Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:2330
+ /// To achieve that, we remove all non-selected destructors from the AST,
+ /// which is a bit unusual. We can't let those declarations be in AST and rely
+ /// on LookupSpecialMember to return the correct declaration because a lot of
----------------
erichkeane wrote:
> I don't think this ends up being acceptable (removing them from the AST). Instead, we should probably mark them as "invalid" and update getDestructor to only return the 'only' destructor, or the first not-invalid one.
I'd rather we stay consistent with the wording, keep track of a selected destructor which would be returned by `getDestructor`. it's more surgery but it's a lot cleaner imo
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126194/new/
https://reviews.llvm.org/D126194
More information about the cfe-commits
mailing list