diff options
| author | Nate Begeman <natebegeman@mac.com> | 2009-01-18 00:45:31 +0000 |
|---|---|---|
| committer | Nate Begeman <natebegeman@mac.com> | 2009-01-18 00:45:31 +0000 |
| commit | c1bf0612ddb89d9566e94626440b17297dcb1570 (patch) | |
| tree | f05e1789a568322dff681305958b84b773fe184b /clang/lib | |
| parent | 1b94d420aec57c2931731e7f76fd28d112e810e4 (diff) | |
| download | bcm5719-llvm-c1bf0612ddb89d9566e94626440b17297dcb1570.tar.gz bcm5719-llvm-c1bf0612ddb89d9566e94626440b17297dcb1570.zip | |
Remove outdated diagnostic. Tests are coming.
llvm-svn: 62437
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 652397939c0..7a6c36416bb 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1296,12 +1296,7 @@ ActOnArraySubscriptExpr(Scope *S, ExprTy *Base, SourceLocation LLoc, } else if (const VectorType *VTy = LHSTy->getAsVectorType()) { BaseExpr = LHSExp; // vectors: V[123] IndexExpr = RHSExp; - - // Component access limited to variables (reject vec4.rg[1]). - if (!isa<DeclRefExpr>(BaseExpr) && !isa<ArraySubscriptExpr>(BaseExpr) && - !isa<ExtVectorElementExpr>(BaseExpr)) - return Diag(LLoc, diag::err_ext_vector_component_access) - << SourceRange(LLoc, RLoc); + // FIXME: need to deal with const... ResultType = VTy->getElementType(); } else { @@ -1633,11 +1628,6 @@ ActOnMemberReferenceExpr(Scope *S, ExprTy *Base, SourceLocation OpLoc, } // Handle 'field access' to vectors, such as 'V.xx'. if (BaseType->isExtVectorType() && OpKind == tok::period) { - // Component access limited to variables (reject vec4.rg.g). - if (!isa<DeclRefExpr>(BaseExpr) && !isa<ArraySubscriptExpr>(BaseExpr) && - !isa<ExtVectorElementExpr>(BaseExpr)) - return Diag(MemberLoc, diag::err_ext_vector_component_access) - << BaseExpr->getSourceRange(); QualType ret = CheckExtVectorComponent(BaseType, OpLoc, Member, MemberLoc); if (ret.isNull()) return true; |

