This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Bind return value for assigment and copies of trivial empty classes
ClosedPublic

Authored by tomasz-kaminski-sonarsource on Jul 17 2023, 4:34 AM.

Details

Summary

We now properly bind return value of the trivial copy constructor
and assignments of the empty objects. Such operations do not
perform any loads from the source, however they preserve identity
of the assigned object:

Empty e;
auto& x = (e = Empty());
clang_analyzer_dump(x); // &e, was Unknown

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
tomasz-kaminski-sonarsource requested review of this revision.Jul 17 2023, 4:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 17 2023, 4:34 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
xazax.hun edited the summary of this revision. (Show Details)Jul 17 2023, 5:31 AM
xazax.hun edited the summary of this revision. (Show Details)
xazax.hun edited the summary of this revision. (Show Details)
xazax.hun accepted this revision.Jul 17 2023, 5:37 AM
This revision is now accepted and ready to land.Jul 17 2023, 5:37 AM
This revision was landed with ongoing or failed builds.Jul 17 2023, 11:46 PM
This revision was automatically updated to reflect the committed changes.