[clang] [analyzer] Assert isImplicitObjectMemberFunction in SValBuilder::getCXXThis (PR #220114)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 18 04:12:13 PDT 2026
================
@@ -311,6 +311,8 @@ SValBuilder::getCastedMemRegionVal(const MemRegion *R, QualType Ty) {
/// Return a memory region for the 'this' object reference.
loc::MemRegionVal SValBuilder::getCXXThis(const CXXMethodDecl *D,
----------------
steakhal wrote:
An alternative solution is to change the return type to a nullable `const MemRegion*`.
What is for sure that the doc comment should mention this precondition because its critical for the user. That said, the doc comment should be moved to the header - out of this impl file.
https://github.com/llvm/llvm-project/pull/220114
More information about the cfe-commits
mailing list