================
@@ -155,21 +221,35 @@ void FactsGenerator::VisitUnaryOperator(const 
UnaryOperator *UO) {
 
 void FactsGenerator::VisitReturnStmt(const ReturnStmt *RS) {
   if (const Expr *RetExpr = RS->getRetValue()) {
-    if (hasOrigin(RetExpr)) {
-      OriginID OID = FactMgr.getOriginMgr().getOrCreate(*RetExpr);
-      EscapesInCurrentBlock.push_back(
-          FactMgr.createFact<OriginEscapesFact>(OID, RetExpr));
-    }
+    if (OriginList *List = getOriginsList(*RetExpr))
+      for (OriginList *L = List; L; L = L->peelOuterOrigin())
+        EscapesInCurrentBlock.push_back(FactMgr.createFact<OriginEscapesFact>(
+            L->getOuterOriginID(), RetExpr));
   }
 }
 
 void FactsGenerator::VisitBinaryOperator(const BinaryOperator *BO) {
-  if (BO->isAssignmentOp())
-    handleAssignment(BO->getLHS(), BO->getRHS());
+  if (BO->isCompoundAssignmentOp())
+    return;
+  if (BO->isAssignmentOp()) {
+    const Expr *LHSExpr = BO->getLHS();
+    const Expr *RHSExpr = BO->getRHS();
+
+    if (const auto *DRE_LHS =
----------------
usx95 wrote:

Yes. Added a TODO here as this is the place where it needs to be done.

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

Reply via email to