[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #72607)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 6 11:53:55 PST 2023


================
@@ -221,6 +221,12 @@ namespace {
         ArraySize = 2;
         MostDerivedLength = I + 1;
         IsArray = true;
+      } else if (Type->isVectorType()) {
+        const auto *VT = Type->castAs<VectorType>();
----------------
AaronBallman wrote:

```suggestion
      } else if (const auto *VT = Type->getAs<VectorType>()) {
```

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


More information about the cfe-commits mailing list