[cfe-commits] r74397 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Nate Begeman
natebegeman at mac.com
Sat Jun 27 15:05:56 PDT 2009
Author: sampo
Date: Sat Jun 27 17:05:55 2009
New Revision: 74397
URL: http://llvm.org/viewvc/llvm-project?rev=74397&view=rev
Log:
Implement feedback from Eli re: the purpose of lax vector conversions
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=74397&r1=74396&r2=74397&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat Jun 27 17:05:55 2009
@@ -2931,19 +2931,8 @@
bool Sema::CheckExtVectorCast(SourceRange R, QualType DestTy, QualType SrcTy) {
assert(DestTy->isExtVectorType() && "Not an extended vector type!");
- // If SrcTy is also an ExtVectorType, the types must be identical unless
- // lax vector conversions is enabled.
- if (SrcTy->isExtVectorType()) {
- if (getLangOptions().LaxVectorConversions &&
- Context.getTypeSize(DestTy) == Context.getTypeSize(SrcTy))
- return false;
- if (DestTy != SrcTy)
- return Diag(R.getBegin(),diag::err_invalid_conversion_between_ext_vectors)
- << DestTy << SrcTy << R;
- return false;
- }
-
- // If SrcTy is a VectorType, then only the total size must match.
+ // If SrcTy is a VectorType, the total size must match to explicitly cast to
+ // an ExtVectorType.
if (SrcTy->isVectorType()) {
if (Context.getTypeSize(DestTy) != Context.getTypeSize(SrcTy))
return Diag(R.getBegin(),diag::err_invalid_conversion_between_ext_vectors)
More information about the cfe-commits
mailing list