[clang][dataflow] Treat unions as structs.
authorDani Ferreira Franco Moura <danimoura@google.com>
Fri, 30 Dec 2022 14:09:40 +0000 (14:09 +0000)
committerDani Ferreira Franco Moura <danimoura@google.com>
Tue, 3 Jan 2023 18:36:24 +0000 (18:36 +0000)
commitd862f66221de1463ee7c92fe2e78445edb30a601
tree75446ca856aa0d4bfd91f020f7376137d8a75aed
parenta95717ef71975dca4583944b3b8380284f346129
[clang][dataflow] Treat unions as structs.

This is a straightfoward way to handle unions in dataflow analysis. Without this change, nullability verification crashes on files that contain unions.

Reviewed By: gribozavr2, ymandel

Differential Revision: https://reviews.llvm.org/D140696
clang/include/clang/Analysis/FlowSensitive/StorageLocation.h
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
clang/lib/Analysis/FlowSensitive/Transfer.cpp
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp