================ @@ -748,6 +747,22 @@ SVal CXXInstanceCall::getCXXThisVal() const { return ThisVal; } +const CXXRecordDecl *CXXInstanceCall::getDeclForDynamicType() const { + const MemRegion *R = getCXXThisVal().getAsRegion(); + if (!R) + return nullptr; + + DynamicTypeInfo DynType = getDynamicTypeInfo(getState(), R); + if (!DynType.isValid()) + return nullptr; + + QualType Ty = DynType.getType()->getPointeeType(); + if (Ty.isNull()) ---------------- Xazax-hun wrote:
Sounds good! The assert message made me think that this was a global invariant, not specific to the call site. https://github.com/llvm/llvm-project/pull/111138 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits