Remove outdated diagnostic. Tests are coming.

llvm-svn: 62437
This commit is contained in:
Nate Begeman 2009-01-18 00:45:31 +00:00
parent 1b94d420ae
commit c1bf0612dd
2 changed files with 1 additions and 13 deletions

View File

@ -861,8 +861,6 @@ DIAG(err_ext_vector_component_requires_even, ERROR,
"vector component access invalid for odd-sized type %0")
DIAG(err_ext_vector_component_name_illegal, ERROR,
"illegal vector component name '%0'")
DIAG(err_ext_vector_component_access, ERROR,
"vector component access limited to variables")
DIAG(err_attribute_address_space_not_int, ERROR,
"address space attribute requires an integer constant")
DIAG(err_attribute_address_multiple_qualifiers, ERROR,

View File

@ -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;