[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 1 07:54:22 PDT 2024


================
@@ -964,17 +966,34 @@ static bool pathOnlyInitializesGslPointer(IndirectLocalPath &Path) {
   return false;
 }
 
-void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity,
+void checkExprLifetime(Sema &SemaRef, const CheckingEntity &CEntity,
----------------
Xazax-hun wrote:

This! This already looks much better! I think we can get rid of the pointer union as well by sort of "inlining" the two branches of the if statement in the implementation function into the corresponding overloads. But I am also OK with the current PR as is. 

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


More information about the cfe-commits mailing list