This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Simplify implementation of `transferStdForwardCall()` in optional check.
ClosedPublic

Authored by mboehme on Jul 13 2023, 7:23 AM.

Details

Summary

The argument and return value of std::forward is always a reference, so we can simply forward the storage location.

Depends On D155075

Diff Detail

Event Timeline

mboehme created this revision.Jul 13 2023, 7:23 AM
Herald added a project: Restricted Project. · View Herald Transcript
mboehme requested review of this revision.Jul 13 2023, 7:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2023, 7:23 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
mboehme edited the summary of this revision. (Show Details)Jul 13 2023, 7:25 AM
gribozavr2 accepted this revision.Jul 13 2023, 7:28 AM
gribozavr2 added a subscriber: gribozavr2.
gribozavr2 added inline comments.
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
683

Should we add an assert that it is not a value?

This revision is now accepted and ready to land.Jul 13 2023, 7:28 AM
ymandel accepted this revision.Jul 13 2023, 8:58 AM
mboehme marked an inline comment as done.Jul 14 2023, 12:05 AM
mboehme added inline comments.
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
683

getStorageLocationStrict already contains such an assertion.

xazax.hun accepted this revision.Jul 15 2023, 7:42 AM
This revision was landed with ongoing or failed builds.Jul 17 2023, 12:26 AM
This revision was automatically updated to reflect the committed changes.
mboehme marked an inline comment as done.