<div>I need a way easily check to make sure a function has no virtual functions, or other stuff that would inject extra stuff into an object or structure, as part of the validation for the vecreturn attribute.  How do I do it?</div>

<div> </div>
<div>Checking the CXXRecordDecl::PlainOldData flag with isPOD doesn't work, because the the strict definition of POD goes too far for this case.  Basically, I need a case like the following (to be build with clang -cc1 -fsyntax-only -faltivec -triple=powerpc file.cpp) to work:</div>

<div> </div>
<div>class Scalar<br>{<br>public:<br> Scalar();<br> ~Scalar();</div>
<div>private:<br> vector float m_value;<br>} __attribute__((vecreturn));<br></div>
<div>The following code in HandleVecReturnAttr produces the error because the class is not strictly POD:</div>
<div> </div>
<div>  if (isa<CXXRecordDecl>(record)) {<br>    if (!cast<CXXRecordDecl>(record)->isPOD()) {<br>  S.Diag(Attr.getLoc(), diag::err_attribute_vecreturn_only_pod_record);<br>  return;<br>    }<br>  }<br><br clear="all">
Thanks.</div>
<div> </div>
<div>-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>