summaryrefslogtreecommitdiffstats
path: root/clang/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Sema/SemaExpr.cpp')
-rw-r--r--clang/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp
index 0d48ad7aa52..31cdc5947f4 100644
--- a/clang/Sema/SemaExpr.cpp
+++ b/clang/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...
OpenPOWER on IntegriCloud