Charusso added a comment. Please avoid to stuff in `CheckerContext` because this facility should be used by ExprEngine/Store as well. Let us reword your API: `getDynamicSizeWithOffset(ProgramStateRef, SVal, SValBuilder &)`. Of course we are trying to obtain some buffer-ish size, that is the purpose of the entire API. I also could imagine something like `getDynamicSizeMul(ProgramStateRef, const MemRegion &, const MemRegion &, SValBuilder &)`, as it is very common.
May it would make sense to use the API like: getDynamicSizeWithOffset(State, MR, SVB) { Offset = State->getStoreManager().getStaticOffset(MR, SVB); ... } This idea is similar to `MemRegionManager::getStaticSize(MR, SVB)`. Hopefully no-one needs dynamic offsets. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77066/new/ https://reviews.llvm.org/D77066 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits