diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-04-22 21:36:49 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-04-22 21:36:49 +0000 |
commit | b957113b3ffebc5fb50982a5e138d36a1b2ff81d (patch) | |
tree | 24f4a4e21385ef80de08a77bb3d2d66f4fb119f2 /llvm/lib/Bitcode/Reader/BitReader.cpp | |
parent | 3437669ca94236918c654f042e33dfa0c32cbd0f (diff) | |
download | llvm-b957113b3ffebc5fb50982a5e138d36a1b2ff81d.zip llvm-b957113b3ffebc5fb50982a5e138d36a1b2ff81d.tar.gz llvm-b957113b3ffebc5fb50982a5e138d36a1b2ff81d.tar.bz2 |
[analyzer] Treat reinterpret_cast like a base cast in certain cases.
The analyzer represents all pointer-to-pointer bitcasts the same way, but
this can be problematic if an implicit base cast gets layered on top of a
manual base cast (performed with reinterpret_cast instead of static_cast).
Fix this (and avoid a valid assertion) by looking through cast regions.
Using reinterpret_cast this way is only valid if the base class is at the
same offset as the derived class; this is checked by -Wreinterpret-base-class.
In the interest of performance, the analyzer doesn't repeat this check
anywhere; it will just silently do the wrong thing (use the wrong offsets
for fields of the base class) if the user code is wrong.
PR15394
llvm-svn: 180052
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitReader.cpp')
0 files changed, 0 insertions, 0 deletions