[clang][dataflow] Assign aggregate storage locations to union stmts
authorStanislav Gatev <sgatev@google.com>
Wed, 26 Jan 2022 09:15:07 +0000 (09:15 +0000)
committerStanislav Gatev <sgatev@google.com>
Wed, 26 Jan 2022 10:36:49 +0000 (10:36 +0000)
commit188d28f73cc7b7891c182a85fdb6e274123b5b69
tree3de26075a1350f976609927ea5cf76f1103dc002
parente9b4239fefa657362678c063c1ba81b0eed2cab3
[clang][dataflow] Assign aggregate storage locations to union stmts

This patch ensures that the dataflow analysis framework does not crash
when it encounters access to members of union types.

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: xazax.hun
Differential Revision: https://reviews.llvm.org/D118226
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp