================ @@ -437,6 +442,16 @@ namespace { MostDerivedArraySize = 2; MostDerivedPathLength = Entries.size(); } + void addVectorUnchecked(QualType EltTy, uint64_t Size, uint64_t Idx) { + Entries.push_back(PathEntry::ArrayIndex(Idx)); + + // This is technically a most-derived object, though in practice this + // is unlikely to matter. + MostDerivedType = EltTy; + MostDerivedIsArrayElement = true; + MostDerivedArraySize = Size; ---------------- AaronBallman wrote:
> That said, I see it's what the `Complex` type is doing, and I whose elements > I think are also not individually addressable, so 🤷 C23 6.2.5p17: Each complex type has the same representation and alignment requirements as an array type containing exactly two elements of the corresponding real type; the first element is equal to the real part, and the second element to the imaginary part, of the complex number. CC @jcranmer-intel @arsenm for some other opinions on whether you should be able to address a vector type in a constant expression. https://github.com/llvm/llvm-project/pull/72607 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits