]> granicus.if.org Git - clang/commit
[analyzer] Fix a crash on accessing a field within a literal-initialized union.
authorArtem Dergachev <artem.dergachev@gmail.com>
Tue, 22 Nov 2016 04:29:23 +0000 (04:29 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Tue, 22 Nov 2016 04:29:23 +0000 (04:29 +0000)
commitdde9099a8196580efe15e2bf5c8dc9e3830745da
tree8936dda27d54ee68ade430337f1baa44bd53d196
parentce3a8838f19bcbef09067278bc9440f76123f7df
[analyzer] Fix a crash on accessing a field within a literal-initialized union.

Because in case of unions we currently default-bind compound values in the
store, this quick fix avoids the crash for this case.

Patch by Ilya Palachev and independently by Alexander Shaposhnikov!

Differential Revision: https://reviews.llvm.org/D26442

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287618 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/RegionStore.cpp
test/Analysis/uninit-vals-union.c [new file with mode: 0644]