[clang] [Clang] fix crash when constexpr evaluation encounters uninitialized GCC vector (PR #180293)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 9 00:57:25 PST 2026


================
@@ -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();
+        }
----------------
Fznamznon wrote:

That part needs a test.

https://github.com/llvm/llvm-project/pull/180293


More information about the cfe-commits mailing list