diff options
author | Nate Begeman <natebegeman@mac.com> | 2009-06-27 22:05:55 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2009-06-27 22:05:55 +0000 |
commit | 9b10da6f710617570e585e0504768f1e9bc6f145 (patch) | |
tree | a0835490a67763935da30617d1d2207d594beb56 | |
parent | 364e021e8cbbeebd4d2544053268a008cf9ee5a9 (diff) |
Implement feedback from Eli re: the purpose of lax vector conversions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74397 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 383edeca07..464ee939ff 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -2931,19 +2931,8 @@ bool Sema::CheckVectorCast(SourceRange R, QualType VectorTy, QualType Ty) { 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) |