[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


================
@@ -3599,6 +3599,11 @@ static void expandArray(APValue &Array, unsigned Index) {
   Array.swap(NewValue);
 }
 
+static void expandVector(APValue &Vec, unsigned NumElements) {
----------------
Fznamznon wrote:

Maybe it is worth leaving a comment saying that unlike `expandArray` this function simply expands an indeterminate value to a vector of indeterminate values. It won't preserve anything that is in `Vec` already. Maybe it is also worth adding an assertion that the incoming value is `indeterminate` to avoid misuse.

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


More information about the cfe-commits mailing list