[cfe-commits] r47295 - /cfe/trunk/Sema/SemaExpr.cpp
Eli Friedman
eli.friedman at gmail.com
Mon Feb 18 22:32:46 PST 2008
On Feb 18, 2008 5:11 PM, Nate Begeman <natebegeman at mac.com> wrote:
> // 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...
What exactly is the point of this restriction? I don't see why you
can't allow component access for arbitrary vectors.
-Eli
More information about the cfe-commits
mailing list