================ @@ -797,6 +798,10 @@ RuntimeDefinition CXXInstanceCall::getRuntimeDefinition() const { return {}; } + const MemRegion *R = getCXXThisVal().getAsRegion(); + DynamicTypeInfo DynType = getDynamicTypeInfo(getState(), R); ---------------- Xazax-hun wrote:
My understanding is that we do this lookup twice now and we only need the result of `DynType.canBeASubClass()`. I wonder if it would make sense for ` getDeclForDynamicType()` to return a pair, the pointer to a declaration and a bool if the dynamic type could be a subclass to avoid the extra lookup. Other clients of that API might also want to know how precise is the dynamic type. 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