This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow][NFC] Share code between Environment ctor and pushCallInternal().
ClosedPublic

Authored by mboehme on Mar 31 2023, 7:30 AM.

Details

Summary

The deduplicated code is moved into initVars().

As an added bonus, pushCallInternal() now also gets the "Add all fields
mentioned in default member initializers" behavior, which apparently had been
added to the Environment ctor but not pushCallInternal().

Diff Detail

Event Timeline

mboehme created this revision.Mar 31 2023, 7:30 AM
Herald added a project: Restricted Project. · View Herald Transcript
mboehme requested review of this revision.Mar 31 2023, 7:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2023, 7:30 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
xazax.hun accepted this revision.Mar 31 2023, 8:37 AM
This revision is now accepted and ready to land.Mar 31 2023, 8:37 AM
xazax.hun added inline comments.Mar 31 2023, 8:38 AM
clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
465

I wonder if we should rename this to something like initFieldAndGlobals.

ymandel accepted this revision.Mar 31 2023, 10:14 AM

Thank you!

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

+1

mboehme updated this revision to Diff 510410.Apr 2 2023, 11:59 PM

Changes in response to review comments

mboehme updated this revision to Diff 510413.Apr 3 2023, 12:03 AM
mboehme marked 2 inline comments as done.

Rename function again to be consistent with getFieldsAndGlobalVars().

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

Done.