[cfe-commits] r74247 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/Sema.h lib/Sema/SemaExpr.cpp test/Sema/ext_vector_casts.c test/Sema/vector-cast.c
Nate Begeman
natebegeman at mac.com
Fri Jun 26 15:59:58 PDT 2009
On Jun 26, 2009, at 2:51 PM, Eli Friedman wrote:
> On Thu, Jun 25, 2009 at 5:50 PM, Nate Begeman<natebegeman at mac.com>
> wrote:
>> + // 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;
>> + }
>
> LaxVectorConversions is supposed to control implicit conversions. I
> see no reason to disallow explicit conversions.
>
> -Eli
Good call.
Nate
More information about the cfe-commits
mailing list