This is an archive of the discontinued LLVM Phabricator instance.

[C++20] [Modules] Make placement allocation functions always acceptable
ClosedPublic

Authored by ChuanqiXu on Jan 4 2023, 6:52 PM.

Details

Summary

Close https://github.com/llvm/llvm-project/issues/59601.

This is actually a workaround for the issue. See the comments and the test for example. The proper fix should make the placement allocation functions acceptable based on the context. But it is harder and more complex on the one side. On the other side, such workaround won't be too bad in practice since users rarely call the placement allocation functions directly.

So personally I prefer to address such problems in the simpler way.

Diff Detail

Event Timeline

ChuanqiXu created this revision.Jan 4 2023, 6:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 6:52 PM
ChuanqiXu requested review of this revision.Jan 4 2023, 6:52 PM
royjacobson accepted this revision.Jan 7 2023, 9:33 AM

Since people run into this very quickly and the Clang workaround is pretty simple, LGTM.

This revision is now accepted and ready to land.Jan 7 2023, 9:33 AM
This revision was landed with ongoing or failed builds.Jan 8 2023, 6:41 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2023, 6:41 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript