This is an archive of the discontinued LLVM Phabricator instance.

[ADT] Clarify llvm::bit_cast implementation comment
ClosedPublic

Authored by jloser on Aug 21 2022, 9:44 AM.

Details

Summary

When reviewing https://reviews.llvm.org/D132330, I noticed a few pre-existing
comments regarding the implementation of llvm::bit_cast. These comments are a
bit misleading since std::bit_cast is a C++20 standard library thing, not a
C++17 one (otherwise we could use it directly). Clarify that in the comment.

Diff Detail

Event Timeline

jloser created this revision.Aug 21 2022, 9:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2022, 9:44 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
jloser requested review of this revision.Aug 21 2022, 9:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2022, 9:44 AM
jloser updated this revision to Diff 454324.Aug 21 2022, 9:49 AM
jloser retitled this revision from [ADT] Clarify llvm::bit_cast implementation comments to [ADT] Clarify llvm::bit_cast implementation comment.
jloser edited the summary of this revision. (Show Details)

Only mention the C++17 vs C++20 difference - leave the trivially constructible comment alone.

kazu accepted this revision.Aug 21 2022, 10:40 AM

Thanks!

This revision is now accepted and ready to land.Aug 21 2022, 10:40 AM
MaskRay accepted this revision.Aug 21 2022, 11:25 AM

LGTM.

This revision was landed with ongoing or failed builds.Aug 21 2022, 5:14 PM
This revision was automatically updated to reflect the committed changes.