[cfe-commits] r64667 - in /cfe/trunk: clang.xcodeproj/project.pbxproj include/clang/AST/Expr.h lib/CodeGen/CGExpr.cpp lib/Sema/SemaExpr.cpp test/Sema/ext_vector_components.c

Eli Friedman eli.friedman at gmail.com
Mon Feb 16 13:25:37 PST 2009


On Mon, Feb 16, 2009 at 1:11 PM, Chris Lattner <sabre at nondot.org> wrote:
> +  // ExtVectorElementExpr's base can either be a vector or pointer to vector.
> +  if (const PointerType *PT = E->getBase()->getType()->getAsPointerType()) {

Ugly; ExtVectorElementExpr should have an isArrow() property.

> +    llvm::Value *Ptr = EmitScalarExpr(E->getBase());
> +    Base = LValue::MakeAddr(Ptr, PT->getPointeeType().getCVRQualifiers());

Do we distinguish between a volatile vector and a vector with volatile
elements?  In any case, it's not very clean to be using
getCVRQualifiers on a non-canonical type.

-Eli



More information about the cfe-commits mailing list