This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Mark the referenced destructor during transformation of a `CXXBindTemporaryExpr`
ClosedPublic

Authored by akyrtzi on Feb 23 2022, 12:06 PM.

Details

Summary

Otherwise we will fail to generate the definition of a defaulted destructor,
if the only reference was in a templated temporary.

rdar://89366678

Diff Detail

Event Timeline

akyrtzi requested review of this revision.Feb 23 2022, 12:06 PM
akyrtzi created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2022, 12:06 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Feb 24 2022, 8:45 AM
akyrtzi updated this revision to Diff 411185.Feb 24 2022, 10:51 AM

Make sure to check the destructor decl pointer for nil before passing to Sema::MarkFunctionReferenced()

akyrtzi updated this revision to Diff 411186.Feb 24 2022, 10:54 AM

Move the const_cast to the call site.

akyrtzi updated this revision to Diff 411219.Feb 24 2022, 12:56 PM

Add a target triple to the test, so it can pass on windows.

This revision was landed with ongoing or failed builds.Mar 8 2022, 1:00 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 1:00 AM