================ @@ -544,6 +545,21 @@ const ExplodedNode *StreamChecker::getAcquisitionSite(const ExplodedNode *N, return nullptr; } +static ProgramStateRef +escapeArgs(ProgramStateRef State, CheckerContext &C, const CallEvent &Call, + const SmallVector<unsigned int> &EscapingArgs) { + const auto *CE = Call.getOriginExpr(); + + SmallVector<SVal> EscapingVals; + EscapingVals.reserve(EscapingArgs.size()); + for (auto EscArgIdx : EscapingArgs) + EscapingVals.push_back(Call.getArgSVal(EscArgIdx)); + State = State->invalidateRegions(EscapingVals, CE, C.blockCount(), + C.getLocationContext(), + /*CausesPointerEscape=*/false); ---------------- steakhal wrote:
Yup, have a look at `RegionStoreManager::invalidateRegions`. Depending on the nature of the call, invalidates system or every global variables. We don't really care about it, so let's just not pass the `Call` here. https://github.com/llvm/llvm-project/pull/79470 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits