title: Dumping memory layout with clang
body: <p>Hi search for a way to dump the memory layout of a class/structure/datatype with clang.
  I have a simple application based on <a href="http://clang.llvm.org/docs/RAVFrontendAction.html" rel="nofollow">this</a> tutorial.</p>
  
  <p>I also added this function </p>
  
  <pre><code> bool VisitFieldDecl(FieldDecl *F)
  {
    F-&gt;dump();
    std::cerr &lt;&lt; F-&gt;getQualifiedNameAsString()  &lt;&lt; " " &lt;&lt; F-&gt;getBitWidthValue(*Context) &lt;&lt; " " &lt;&lt; std::endl;
    F-&gt;dump() ;
    std::cerr &lt;&lt; "-----------------------------------------" &lt;&lt; std::endl;
    return true;
  }
  </code></pre>
  
  <p>Unfortunately getBitWidthValue also returns zero for my types.</p>
  
  <p>I need the complete memory-layout recursively for each class and all nested types. Including sizes/offsets.</p>
  
  <p>Maybe the AST is the wrong place, and i need a other hook to start?</p>