On Sat, Jun 27, 2009 at 7:36 PM, Nate Begeman<[email protected]> wrote:
> +  // Handle the case of an ext vector and scalar
> +  if (const ExtVectorType *LV = lhsType->getAsExtVectorType()) {
> +    QualType EltTy = LV->getElementType();
> +    if (EltTy->isIntegralType() && rhsType->isIntegralType()) {
> +      if (Context.getIntegerTypeOrder(EltTy, rhsType) >= 0) {
> +        ImpCastExprToType(rex, EltTy);
> +        rex = new (Context) CStyleCastExpr(lhsType, rex, lhsType,
> +                                           rex->getSourceRange().getBegin(),
> +                                           rex->getSourceRange().getEnd());
> +        if (swapped) std::swap(rex, lex);
> +        return lhsType;
> +      }
> +    }

Creating a CStyleCastExpr here leads to a misleading AST; is there
some reason why you can't just use ImpCastExprToType(rex, lhsType)"?

-Eli

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to