================
@@ -4291,7 +4296,20 @@ findSubobject(EvalInfo &Info, const Expr *E, const 
CompleteObject &Obj,
 
       ObjType = VT->getElementType();
       assert(I == N - 1 && "extracting subobject of scalar?");
-      return handler.found(O->getVectorElt(Index), ObjType);
+
+      if (O->isIndeterminate() || O->isAbsent()) {
+        if (isRead(handler.AccessKind)) {
+          Info.FFDiag(E);
+          return handler.failed();
+        }
+        expandVector(*O, NumElements);
+      }
+
+      if (O->isVector())
----------------
Fznamznon wrote:

I think this `if` should be an `assert` instead.

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

Reply via email to