diff options
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r-- | clang/lib/AST/ExprClassification.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp index 12510d68830..72f17669ed1 100644 --- a/clang/lib/AST/ExprClassification.cpp +++ b/clang/lib/AST/ExprClassification.cpp @@ -291,8 +291,11 @@ static Cl::Kinds ClassifyInternal(ASTContext &Ctx, const Expr *E) { // Extended vector element access is an lvalue unless there are duplicates // in the shuffle expression. case Expr::ExtVectorElementExprClass: - return cast<ExtVectorElementExpr>(E)->containsDuplicateElements() ? - Cl::CL_DuplicateVectorComponents : Cl::CL_LValue; + if (cast<ExtVectorElementExpr>(E)->containsDuplicateElements()) + return Cl::CL_DuplicateVectorComponents; + if (cast<ExtVectorElementExpr>(E)->isArrow()) + return Cl::CL_LValue; + return ClassifyInternal(Ctx, cast<ExtVectorElementExpr>(E)->getBase()); // Simply look at the actual default argument. case Expr::CXXDefaultArgExprClass: |