]> granicus.if.org Git - clang/commit
[analyzer] Update RegionStoreManager::getBinding to handle BlockDataRegions
authorDevin Coughlin <dcoughlin@apple.com>
Thu, 5 Nov 2015 18:56:42 +0000 (18:56 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Thu, 5 Nov 2015 18:56:42 +0000 (18:56 +0000)
commit709e87080e9fadc040096c66c3d2a447d5a376c2
tree362aeb056cdde19c6722fc56249e0171e4171464
parentc02ad0f182398117e4cccd1f1efd7eb21f6ec7e6
[analyzer] Update RegionStoreManager::getBinding to handle BlockDataRegions

Update RegionStoreManager::getBinding() to return UnknownVal when trying to get
the binding for a BlockDataRegion. Previously, getBinding() would try to cast the
BlockDataRegion to a TypedValueRegion and crash. This happened when a block
was passed as a parameter to an inlined function for which
StackHintGeneratorForSymbol::getMessage() tried to generate a stack hint message.

rdar://problem/21291971

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252185 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/RegionStore.cpp
test/Analysis/malloc-plist.c