[all-commits] [llvm/llvm-project] 8d2a57: [LifetimeSafety] Fix liveness propagation for all ...
Utkarsh Saxena via All-commits
all-commits at lists.llvm.org
Tue Jun 23 10:10:08 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8d2a578b2130742c8790f3dba5fb414962eafcd5
https://github.com/llvm/llvm-project/commit/8d2a578b2130742c8790f3dba5fb414962eafcd5
Author: Utkarsh Saxena <usx at google.com>
Date: 2026-06-23 (Tue, 23 Jun 2026)
Changed paths:
M clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
M clang/lib/Analysis/LifetimeSafety/LiveOrigins.cpp
M clang/test/Sema/LifetimeSafety/invalidations.cpp
Log Message:
-----------
[LifetimeSafety] Fix liveness propagation for all origin flows (#205323)
Previously, the `transfer` function for `OriginFlowFact` only handled
killing the destination origin. It did not propagate liveness backwards
from destination to source, meaning that if an origin flowed into
another, the source was not marked live even when the destination was.
The `transfer` function now propagates liveness from destination to
source: if the destination origin is live, the source origin is also
marked live with the same `LivenessInfo`, before optionally killing the
destination.
Additionally, `handleMovedArgsInCall` now skips rvalue reference
parameters annotated with `[[clang::lifetimebound]]`, since such
parameters should not be treated as moved-from.
This introduces some false positives for invalidations as container
modifications are not considered self-invalidating. The updated test
expectations reflect this, along with `FIXME` comments explaining that
they are false positives stemming from the lack of distinction between
owner-borrows and content-borrows, which will require more precise
`AccessPath` reasoning to resolve.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list