This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Account for global variables in constructor initializers.
ClosedPublic

Authored by ymandel on Dec 21 2022, 2:16 PM.

Details

Summary

Previously, the analysis modeled global variables appearing in the _body_ of
any function (including constructors). But, that misses those appearing in
constructor _initializers_. This patch adds the initializers to the set of
expressions used to determine which globals to model.

Diff Detail

Event Timeline

ymandel created this revision.Dec 21 2022, 2:16 PM
Herald added a project: Restricted Project. · View Herald Transcript
ymandel requested review of this revision.Dec 21 2022, 2:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2022, 2:16 PM
gribozavr2 accepted this revision.Dec 21 2022, 2:21 PM
gribozavr2 added inline comments.
clang/unittests/Analysis/FlowSensitive/DataflowEnvironmentTest.cpp
112
144
This revision is now accepted and ready to land.Dec 21 2022, 2:21 PM
xazax.hun accepted this revision.Dec 21 2022, 2:35 PM