This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Fix missed fields in field set construction.
ClosedPublic

Authored by ymandel on Feb 28 2023, 10:28 AM.

Details

Summary

When building the set of referenced fields for the DataflowAnalysisContext,
include fields referenced only in default member initializers. These
initializers are visited in the CFGs of constructors and so the fields must be
included when analysing constructor bodies.

Diff Detail

Event Timeline

ymandel created this revision.Feb 28 2023, 10:28 AM
Herald added a project: Restricted Project. · View Herald Transcript
ymandel requested review of this revision.Feb 28 2023, 10:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 10:28 AM
xazax.hun accepted this revision.Feb 28 2023, 10:35 AM
This revision is now accepted and ready to land.Feb 28 2023, 10:35 AM
This revision was landed with ongoing or failed builds.Feb 28 2023, 10:57 AM
This revision was automatically updated to reflect the committed changes.
gribozavr2 added inline comments.Mar 20 2023, 2:48 AM
clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp
141

Is foo() used for anything in this test?

ymandel added inline comments.Mar 20 2023, 7:02 AM
clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp
141

not that I can see. looks left over from some previous version. want to remove it?

gribozavr2 added inline comments.Mar 20 2023, 10:33 AM
clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp
141

Actually it is load-bearing: the qualType() matcher below matches the return type of the function.