[clang][dataflow] Replace initValueInStorageLocation with createValue
authorStanislav Gatev <sgatev@google.com>
Mon, 17 Jan 2022 15:17:05 +0000 (15:17 +0000)
committerStanislav Gatev <sgatev@google.com>
Tue, 18 Jan 2022 07:09:35 +0000 (07:09 +0000)
commit782eced561492c74f7b4409d6ee7eee84a1647c7
tree057227e346e4b68379a0f09957798db0f53d830f
parented4d8fdafdb5120b69fe2a8da418dc0c37f79ffc
[clang][dataflow] Replace initValueInStorageLocation with createValue

Since Environment's setValue method already does part of the work that
initValueInStorageLocation does, we can factor out a new createValue
method to reduce the duplication.

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

Reviewed-by: ymandel, xazax.hun
Differential Revision: https://reviews.llvm.org/D117493
clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
clang/lib/Analysis/FlowSensitive/Transfer.cpp