aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp
index 0d48ad7aa5..31cdc5947f 100644
--- a/Sema/SemaExpr.cpp
+++ b/Sema/SemaExpr.cpp
@@ -414,7 +414,7 @@ ActOnArraySubscriptExpr(ExprTy *Base, SourceLocation LLoc,
IndexExpr = RHSExp;
// Component access limited to variables (reject vec4.rg[1]).
- if (!isa<DeclRefExpr>(BaseExpr))
+ if (!isa<DeclRefExpr>(BaseExpr) && !isa<ArraySubscriptExpr>(BaseExpr))
return Diag(LLoc, diag::err_ocuvector_component_access,
SourceRange(LLoc, RLoc));
// FIXME: need to deal with const...