https://github.com/NagyDonat commented:
I fear that this runtime assertion is too weak guarantee given that we (as far as I know) have very little test coverage for explicit object member functions (and they are also rare to nonexistent in current stable project). If you want to really guarantee that `getCXXThis` doesn't return a nonsense `CXXThisRegion` for a method that doesn't have `this`, then I'd suggest changing the return type of this method to `std::optional<loc::MemRegionVal>` and returning `std::nullopt` when analyzing a method that has an explicit object. That way the type system would provide a static guarantee that is validated even without good test coverage. https://github.com/llvm/llvm-project/pull/220114 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
