[analyzer] Don't crash with assertion failure on structured bindings
authorGeorge Karpenkov <ekarpenkov@apple.com>
Wed, 7 Mar 2018 22:20:35 +0000 (22:20 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Wed, 7 Mar 2018 22:20:35 +0000 (22:20 +0000)
commit065962375dbdabd9d6250f5f1b29915b74682417
treed1a5c9eb9fa0b5dfa2f3fe95d0277e565d26ef3f
parent7a5fa21ae2707273a6486c8a438cc81bf3489e26
[analyzer] Don't crash with assertion failure on structured bindings

Proper modeling still remains to be done.
Note that BindingDecl#getHoldingVar() is almost always null, and this
should probably be handled by dealing with DecompositionDecl beforehand.

rdar://36852163

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

llvm-svn: 326951
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
clang/test/Analysis/structured_bindings.cc [new file with mode: 0644]