================
@@ -709,18 +710,16 @@ ProgramStateRef MoveChecker::checkRegionChanges(
// that are passed directly via non-const pointers or non-const references
// or rvalue references.
// In case of an InstanceCall don't invalidate the this-region since
- // it is fully handled in checkPreCall and checkPostCall.
- const MemRegion *ThisRegion = nullptr;
- if (const auto *IC = dyn_cast<CXXInstanceCall>(Call))
- ThisRegion = IC->getCXXThisVal().getAsRegion();
+ // it is fully handled in checkPreCall and checkPostCall, but do invalidate
+ // its strict subregions, as they are not handled.
// Requested ("explicit") regions are the regions passed into the call
// directly, but not all of them end up being invalidated.
// But when they do, they appear in the InvalidatedRegions array as well.
for (const auto *Region : RequestedRegions) {
- if (ThisRegion != Region &&
- llvm::is_contained(InvalidatedRegions, Region))
- State = removeFromState(State, Region);
+ if (llvm::is_contained(InvalidatedRegions, Region))
+ State = removeFromState(State, Region,
+ /*strict=*/!!dyn_cast<CXXInstanceCall>(Call));
----------------
steakhal wrote:
```suggestion
/*Strict=*/isa<CXXInstanceCall>(Call));
```
https://github.com/llvm/llvm-project/pull/169626
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits