================
@@ -73,12 +81,17 @@ bool tryToFindPtrOrigin(
       continue;
     }
     if (auto *Expr = dyn_cast<ConditionalOperator>(E)) {
-      return tryToFindPtrOrigin(Expr->getTrueExpr(), StopAtFirstRefCountedObj,
-                                isSafePtr, isSafePtrType, isSafeGlobalDecl,
-                                callback) &&
+      const bool ShortLivedOnEntry =
+          CrossedShortLivedTemporary && *CrossedShortLivedTemporary;
+      bool TrueResult = tryToFindPtrOrigin(
+          Expr->getTrueExpr(), StopAtFirstRefCountedObj, isSafePtr,
+          isSafePtrType, isSafeGlobalDecl, callback, 
CrossedShortLivedTemporary);
+      if (CrossedShortLivedTemporary)
+        *CrossedShortLivedTemporary = ShortLivedOnEntry;
----------------
rniwa wrote:

Something isn't right about this code. Are we trying to preserve the old value 
of `CrossedShortLivedTemporary`??

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

Reply via email to