This is an archive of the discontinued LLVM Phabricator instance.

[Support] Forward rvalues instead of moving them
AbandonedPublic

Authored by gAlfonso-bit on Dec 6 2022, 3:50 PM.

Details

Reviewers
MaskRay
Summary

Some of these rvalues are moved conditionally, when they should be forwarded instead.

Diff Detail

Event Timeline

gAlfonso-bit created this revision.Dec 6 2022, 3:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2022, 3:50 PM
gAlfonso-bit requested review of this revision.Dec 6 2022, 3:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2022, 3:50 PM
gAlfonso-bit removed a subscriber: MaskRay.
MaskRay accepted this revision.Dec 6 2022, 3:54 PM
This revision is now accepted and ready to land.Dec 6 2022, 3:54 PM
MaskRay requested changes to this revision.Dec 6 2022, 5:22 PM
MaskRay added inline comments.
llvm/include/llvm/Support/raw_ostream.h
407 ↗(On Diff #480660)

This && use seems wrong.

This revision now requires changes to proceed.Dec 6 2022, 5:22 PM
gAlfonso-bit marked an inline comment as done.Dec 6 2022, 7:21 PM
gAlfonso-bit added inline comments.
llvm/include/llvm/Support/raw_ostream.h
407 ↗(On Diff #480660)

How, if I may ask?

gAlfonso-bit marked an inline comment as done.Dec 6 2022, 7:22 PM
This comment was removed by gAlfonso-bit.
MaskRay requested changes to this revision.Dec 6 2022, 10:53 PM

Please spend more time on each call site instead of applying easy fixes from some static analyzer. For example, operator<<(OStream &&OS, const T &Value) { is for value only (see !std::is_reference). std::move is intended.

This revision now requires changes to proceed.Dec 6 2022, 10:53 PM
This comment was removed by gAlfonso-bit.
This comment was removed by gAlfonso-bit.
gAlfonso-bit abandoned this revision.Sep 27 2023, 11:20 AM