[clang] [LifetimeSafety] Detect use-after-return (PR #165370)

Kashika Akhouri via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 10 21:43:24 PST 2025


================
@@ -1202,5 +1202,241 @@ TEST_F(LifetimeAnalysisTest, LivenessOutsideLoop) {
   EXPECT_THAT(Origins({"p"}), MaybeLiveAt("p1"));
 }
 
----------------
kashika0112 wrote:

Could you clarify this more. As seen before, no program point is available after the return statement. We already checking for loans right before the return statement. 

https://github.com/llvm/llvm-project/pull/165370


More information about the cfe-commits mailing list