[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)
Vikram Hegde via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 30 22:35:52 PDT 2024
================
@@ -442,6 +446,16 @@ namespace {
MostDerivedArraySize = 2;
MostDerivedPathLength = Entries.size();
}
+
+ void addVectorElementUnchecked(QualType EltTy, uint64_t Size,
+ uint64_t Idx) {
+ Entries.push_back(PathEntry::ArrayIndex(Idx));
----------------
vikramRH wrote:
Yes, I thought about having a new accessor of the sort "vectorIndex" but all it seems to achieve is just adding new API that returns does the exact same thing as array (other than perhaps adding a new meaning to PathEntry value). I will update it if you feel this makes sense.
https://github.com/llvm/llvm-project/pull/101126
More information about the cfe-commits
mailing list