<div>> Is there a reason why the fix can't be "the operand is of vector type and therefore this is a vector cast and not a vector literal"?</div>
<div> </div>
<div>In the following:</div>
<div> </div>
<div>Sema::ActOnCastOfParenListExpr(Scope *S, SourceLocation LParenLoc,<br> SourceLocation RParenLoc, ExprArg Op,<br> TypeSourceInfo *TInfo) {<br> ParenListExpr *PE = (ParenListExpr *)Op.get();<br>
QualType Ty = TInfo->getType();<br> bool isAltiVecLiteral = false;</div>
<div> // Check for an altivec literal,<br> if (getLangOptions().AltiVec && Ty->isVectorType()) {<br> if (PE->getNumExprs() == 0) {<br> Diag(PE->getExprLoc(), diag::err_altivec_empty_initializer);<br>
return ExprError();<br> }<br> <strong><em>Type *peType = PE->getType().getTypePtr();</em><br></strong> if (peType) {<br> if (peType->isVectorType())<br> isAltiVecLiteral = true;<br> }<br>
}</div>
<div> // If this is an altivec initializer, '(' type ')' '(' init, ..., init ')'<br> // then handle it as such.<br> if (isAltiVecLiteral) {<br>...</div>
<div> </div>
<div>The peType is null, which I assume means the ParenListExpr type has not been set.</div>
<div> </div>
<div>Should it be set at this point, or is this the wrong place to be checking?</div>
<div><br>-John</div>
<div><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br></div>