================
@@ -3760,6 +3765,9 @@ findSubobject(EvalInfo &Info, const Expr *E, const 
CompleteObject &Obj,
     if ((O->isAbsent() && !(handler.AccessKind == AK_Construct && I == N)) ||
         (O->isIndeterminate() &&
          !isValidIndeterminateAccess(handler.AccessKind))) {
+      // Object has ended lifetime since pointer was formed
+      if (handler.AccessKind == AK_IsWithinLifetime)
+        return false;
----------------
hanickadot wrote:

AFAIK you can't use `bool` here, it will be problem when `findSubobject` will 
be used with non-compatible return type

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

Reply via email to