This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Add `DataflowEnvironment::createObject()`.
ClosedPublic

Authored by mboehme on Jul 12 2023, 5:33 AM.

Details

Summary

This consolidates the code used in various places to initialize objects (usually for variables) into one central location.

It will also help reduce the number of changes needed when we make the upcoming API changes to AggregateStorageLocation and StructValue.

Depends On D155074

Diff Detail

Event Timeline

mboehme created this revision.Jul 12 2023, 5:33 AM
Herald added a project: Restricted Project. · View Herald Transcript
mboehme requested review of this revision.Jul 12 2023, 5:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2023, 5:33 AM
mboehme edited the summary of this revision. (Show Details)Jul 12 2023, 5:34 AM
mboehme added reviewers: ymandel, xazax.hun.
ymandel accepted this revision.Jul 12 2023, 11:47 AM

Looks great!

clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
621

At least document the nullability of D and InitExpr?

This revision is now accepted and ready to land.Jul 12 2023, 11:47 AM
mboehme updated this revision to Diff 540022.Jul 13 2023, 7:23 AM

Rebased to head

xazax.hun accepted this revision.Jul 15 2023, 7:35 AM
mboehme updated this revision to Diff 540871.Jul 16 2023, 11:30 PM

Add comment for createObjectInternal()

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.