[llvm-branch-commits] [clang] [analyzer] Only bind aggregate lifetime sources in LifetimeModeling for annotated functions (PR #214824)
Benedek Kaibas via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Aug 10 01:11:11 PDT 2026
================
@@ -180,11 +191,13 @@ void LifetimeModeling::checkPostCall(const CallEvent &Call,
return;
SVal RetVal = Call.getReturnValue();
- SmallVector<const MemRegion *, 4> AggrRegs =
- lifetime_modeling::getRegionsFromAggrVal(RetVal, C);
- for (const MemRegion *I : AggrRegs) {
- State = bindSource(State, RetVal, I);
+ if (isAnnotated(FD)) {
+ SmallVector<const MemRegion *, 4> AggrRegs =
+ lifetime_modeling::getRegionsFromAggrVal(RetVal, C);
+ for (const MemRegion *I : AggrRegs) {
+ State = bindSource(State, RetVal, I);
+ }
----------------
benedekaibas wrote:
Changed loop variable name here: [fbda2f3](https://github.com/llvm/llvm-project/pull/214824/commits/fbda2f34948493a657988e71fcc6b53ae7a8194c)
https://github.com/llvm/llvm-project/pull/214824
More information about the llvm-branch-commits
mailing list