diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-09-07 01:19:42 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-09-07 01:19:42 +0000 |
commit | 8f0d0fef5f90b16600cdb802d5d7344417c34aad (patch) | |
tree | d237b393a9175b705813c37c3f474c54f5247656 /test/Analysis/method-call-path-notes.cpp | |
parent | 061707a86f20bf608758e7013df24bd1be12ffc6 (diff) |
[analyzer] Fail gracefully when the dynamic type is outside the hierarchy.
With some particularly evil casts, we can get an object whose dynamic type
is not actually a subclass of its static type. In this case, we won't even
find the statically-resolved method as a devirtualization candidate.
Rather than assert that this situation cannot occur, we now simply check
that the dynamic type is not an ancestor or descendent of the static type,
and leave it at that.
This error actually occurred analyzing LLVM: CallEventManager uses a
BumpPtrAllocator to allocate a concrete subclass of CallEvent
(FunctionCall), but then casts it to the actual subclass requested
(such as ObjCMethodCall) to perform the constructor.
Yet another crash in PR13763.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/method-call-path-notes.cpp')
0 files changed, 0 insertions, 0 deletions