allows you to do things like
typedef __attribute__(( ocu_vector_type(4))) float float4;
float4 *x;
float y = x[0][2];
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47295
91177308-0d34-0410-b5e6-
96231b3b80d8
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...