aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Analysis/method-call-path-notes.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-09-07 01:19:42 +0000
committerJordan Rose <jordan_rose@apple.com>2012-09-07 01:19:42 +0000
commit81456d9f6ded304518a5ef0c28bd5f8865dc6852 (patch)
tree58aed3effecd9f2a4129bbe0ee33828bc3477e69 /clang/test/Analysis/method-call-path-notes.cpp
parentf02a2e96b89600d227d2b9abca5bbdfee22c74c1 (diff)
downloadllvm-81456d9f6ded304518a5ef0c28bd5f8865dc6852.zip
llvm-81456d9f6ded304518a5ef0c28bd5f8865dc6852.tar.gz
llvm-81456d9f6ded304518a5ef0c28bd5f8865dc6852.tar.bz2
[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. llvm-svn: 163367
Diffstat (limited to 'clang/test/Analysis/method-call-path-notes.cpp')
0 files changed, 0 insertions, 0 deletions