[cfe-commits] r62437 - in /cfe/trunk: include/clang/Basic/DiagnosticKinds.def lib/Sema/SemaExpr.cpp
Nate Begeman
natebegeman at mac.com
Sat Jan 17 16:45:31 PST 2009
Author: sampo
Date: Sat Jan 17 18:45:31 2009
New Revision: 62437
URL: http://llvm.org/viewvc/llvm-project?rev=62437&view=rev
Log:
Remove outdated diagnostic. Tests are coming.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticKinds.def
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticKinds.def?rev=62437&r1=62436&r2=62437&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticKinds.def (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticKinds.def Sat Jan 17 18:45:31 2009
@@ -861,8 +861,6 @@
"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,
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=62437&r1=62436&r2=62437&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat Jan 17 18:45:31 2009
@@ -1296,12 +1296,7 @@
} 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 @@
}
// 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;
More information about the cfe-commits
mailing list