================
@@ -642,12 +642,14 @@ void FactsGenerator::VisitMaterializeTemporaryExpr(
   OriginList *RValMTEList = MTEList->peelOuterOrigin();
   flow(RValMTEList, SubExprList, /*Kill=*/true);
   OriginID OuterMTEID = MTEList->getOuterOriginID();
-  if (MTE->getStorageDuration() == SD_FullExpression) {
-    // Issue a loan to MTE for the storage location represented by MTE.
-    const Loan *L = createLoan(FactMgr, MTE);
-    CurrentBlockFacts.push_back(
-        FactMgr.createFact<IssueFact>(L->getID(), OuterMTEID));
-  }
+  const Loan *L = createLoan(FactMgr, MTE);
+  CurrentBlockFacts.push_back(
+      FactMgr.createFact<IssueFact>(L->getID(), OuterMTEID));
+  // A temporary extended to static or thread storage duration never expires
+  // within the function. An automatic one expires with its extending variable.
----------------
Xazax-hun wrote:

Could you elaborate on what kind of comment would you find helpful? 

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

Reply via email to