[clang] [llvm] [LifetimeSafety] Add lifetimebound inference for std::make_unique (PR #191632)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 13 01:53:36 PDT 2026


================
@@ -484,7 +484,8 @@ void FactsGenerator::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *OCE) {
       hasOrigins(OCE->getArg(0)->getType())) {
     // Pointer-like types: assignment inherently propagates origins.
     QualType LHSTy = OCE->getArg(0)->getType();
-    if (LHSTy->isPointerOrReferenceType() || isGslPointerType(LHSTy)) {
+    if (LHSTy->isPointerOrReferenceType() || isGslPointerType(LHSTy) ||
+        isGslOwnerType(LHSTy)) {
----------------
Xazax-hun wrote:

> origin propagation should happen regardless in all cases (if there is an origin)

This makes sense to me. 

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


More information about the cfe-commits mailing list