This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Add a transfer function for InitListExpr
ClosedPublic

Authored by sgatev on Jan 25 2022, 3:13 AM.

Details

Summary

This is part of the implementation of the dataflow analysis framework.
See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.

Diff Detail

Event Timeline

sgatev created this revision.Jan 25 2022, 3:13 AM
sgatev requested review of this revision.Jan 25 2022, 3:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2022, 3:13 AM
xazax.hun added inline comments.Jan 25 2022, 3:53 AM
clang/lib/Analysis/FlowSensitive/Transfer.cpp
421

Why do we expect this assertion to be true? Aren't InitListExprs also used to initialize arrays?

sgatev updated this revision to Diff 402840.Jan 25 2022, 4:16 AM
sgatev marked an inline comment as done.

Address reviewers' comments.

clang/lib/Analysis/FlowSensitive/Transfer.cpp
421

Yes, but I don't plan to add support for array initialization in this patch so let me restructure the code and add a FIXME.

xazax.hun accepted this revision.Jan 25 2022, 4:19 AM
This revision is now accepted and ready to land.Jan 25 2022, 4:19 AM
This revision was landed with ongoing or failed builds.Jan 25 2022, 8:30 AM
This revision was automatically updated to reflect the committed changes.