================
@@ -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)) {
----------------
usx95 wrote:

This is primarily to allow loan propagation across assignment and specially 
opaque user-defined assignment operators.

I feel a bit torn here and feel that origin propagation should happen 
regardless in all cases (if there is an origin). This becomes more natural if 
we move towards type-integration and subtyping rules.

https://github.com/llvm/llvm-project/pull/191632
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to