[clang][dataflow] Fix missed fields in field set construction.
authorYitzhak Mandelbaum <yitzhakm@google.com>
Tue, 28 Feb 2023 18:19:40 +0000 (18:19 +0000)
committerYitzhak Mandelbaum <yitzhakm@google.com>
Tue, 28 Feb 2023 18:56:54 +0000 (18:56 +0000)
commit73c98831f6482371f9b773592478ea9e51a6b16a
tree6a3589e7445a2b7f9057521543919a2dabc6c5dc
parentcb3c41c285fc76f21162c67503de32f83f278fae
[clang][dataflow] Fix missed fields in field set construction.

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.

Differential Revision: https://reviews.llvm.org/D144987
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp