diff options
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 7c933f4..f2e49b9 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -9202,7 +9202,10 @@ bool LValueExprEvaluator::VisitExtVectorElementExpr( if (Success) { Result.setFrom(Info.Ctx, Val); - const auto *VT = E->getBase()->getType()->castAs<VectorType>(); + QualType BaseType = E->getBase()->getType(); + if (E->isArrow()) + BaseType = BaseType->getPointeeType(); + const auto *VT = BaseType->castAs<VectorType>(); HandleLValueVectorElement(Info, E, Result, VT->getElementType(), VT->getNumElements(), Indices[0]); } |