================
@@ -532,6 +533,11 @@ static void 
visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path,
     }
   } while (Init != Old);
 
+  if (auto *DAE = dyn_cast<CXXDefaultArgExpr>(Init)) {
+    Path.push_back({IndirectLocalPathEntry::DefaultArg, DAE, DAE->getParam()});
+    Init = DAE->getExpr();
+  }
----------------
zygoloid wrote:

I think this should be in the loop above -- the default argument could itself 
contain one of the other expressions that we want to skip over.

https://github.com/llvm/llvm-project/pull/112047
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to