]> granicus.if.org Git - clang/commit
[analyzer] Fix MemRegion crash casting non-struct to derived struct (PR25426).
authorDevin Coughlin <dcoughlin@apple.com>
Sat, 5 Dec 2015 00:22:36 +0000 (00:22 +0000)
committerDevin Coughlin <dcoughlin@apple.com>
Sat, 5 Dec 2015 00:22:36 +0000 (00:22 +0000)
commit316669967e3e6cf6b8e093c98e270c994de37268
tree7da82a524a7cba8850527fa7acc7125c1434f07f
parent3b59f3512f9b80365b2d93caa2ef52fae2a03e57
[analyzer] Fix MemRegion crash casting non-struct to derived struct (PR25426).

This commit prevents MemRegion::getAsOffset() from crashing when the analyzed
program casts a symbolic region of a non-record type to some derived type and
then attempts to access a field of the base type.

rdar://problem/23458069

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254806 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/MemRegion.cpp
test/Analysis/reinterpret-cast.cpp