<div dir="ltr">To avoid reporting an already-fixed issue for a trap that occurs in some AST internals when I run some ASTvisitor code, I've updated to a current version of the compiler (Revision: 175922).  Unfortunately this breaks my visitor source in a way that I'm not sure how to deal with:<br>
<br><div>In file included from /clangdir/include/clang/AST/RecursiveASTVisitor.h:17:</div><div>In file included from /clangdir/include/clang/AST/Decl.h:17:</div><div>In file included from /clangdir/include/clang/AST/APValue.h:17:</div>
<div>In file included from /clangdir/include/clang/Basic/LLVM.h:22:</div><div>/clangdir/include/llvm/Support/Casting.h:51:16: error: no member named 'classof' in 'clang::ArrayTypeLoc'</div><div>    return To::classof(&Val);</div>
<div>           ~~~~^</div><div>/clangdir/include/llvm/Support/Casting.h:80:32: note: in instantiation of member function 'llvm::isa_impl<clang::ArrayTypeLoc, clang::TypeLoc,</div><div>      void>::doit' requested here</div>
<div>    return isa_impl<To, From>::doit(*Val);</div><div>                               ^</div><div>/clangdir/include/llvm/Support/Casting.h:113:36: note: in instantiation of member function 'llvm::isa_impl_cl<clang::ArrayTypeLoc,</div>
<div>      clang::TypeLoc *>::doit' requested here</div><div>    return isa_impl_cl<To,FromTy>::doit(Val);</div><div>                                   ^</div><div>/clangdir/include/llvm/Support/Casting.h:124:70: note: in instantiation of member function 'llvm::isa_impl_wrap<clang::ArrayTypeLoc,</div>
<div>      clang::TypeLoc *, clang::TypeLoc *>::doit' requested here</div><div>  return isa_impl_wrap<X, Y, typename simplify_type<Y>::SimpleType>::doit(Val);</div><div>                                                                     ^</div>
<div>/clangdir/include/llvm/Support/Casting.h:276:10: note: in instantiation of function template specialization</div><div>      'llvm::isa<clang::ArrayTypeLoc, clang::TypeLoc *>' requested here</div><div>  return isa<X>(Val) ? cast<X>(Val) : 0;</div>
<div>         ^</div><div>./classvisitor.h:69:51: note: in instantiation of function template specialization 'llvm::dyn_cast<clang::ArrayTypeLoc, clang::TypeLoc>' requested here</div><div>      if ( const ArrayTypeLoc * pTypeLocIfArray = dyn_cast<ArrayTypeLoc>( &thisFieldTypeLoc ) )</div>
<div>                                                  ^</div><div style><br></div><div style>The code in question is:<br><br><div>inline QualType getQualTypeForDecl( DeclaratorDecl * f )</div><div>{</div><div>   TypeSourceInfo * pThisFieldSourceInfo = f->getTypeSourceInfo() ;</div>
<div><br></div><div>   TypeLoc thisFieldTypeLoc = pThisFieldSourceInfo->getTypeLoc() ;</div><div><br></div><div>   // don't care if it's an array, just want the basic underlying type of the array.</div><div>   for ( ; ; )</div>
<div>   {</div><div>      if ( const ArrayTypeLoc * pTypeLocIfArray = dyn_cast<ArrayTypeLoc>( &thisFieldTypeLoc ) )</div><div>      {</div><div>         thisFieldTypeLoc = pTypeLocIfArray->getElementLoc() ;</div>
<div>      }</div><div>      else</div><div>      {</div><div>         break ;</div><div>      }</div><div>   }</div><div><br></div><div>   return thisFieldTypeLoc.getType() ;</div><div>}</div><div style><br>which was a helper function I used to extract the underlying type in case it was an array.  I'm assuming that this should now be done differently... if so, how?</div>
</div><div><br></div>-- <br>Peeter
</div>