title: Is typedef allowed before definition
body: <p>Minimum code:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>// foo.h
  
  typedef struct foo_s foo_t;
  
  struct foo_s {
    foo_t* next;
  };
  </code></pre>
  
  <p><code>iwyu</code> insists I forward declare <code>struct foo_s</code> before I <code>typedef</code> it to <code>foo_t</code>.</p>
  
  <p>Output:</p>
  
  <pre class="lang-sh prettyprint-override"><code>$ iwyu -c foo.h 
  
  foo.h should add these lines:
  struct foo_s;
  
  foo.h should remove these lines:
  
  The full include-list for foo.h:
  struct foo_s;
  ---
  </code></pre>
  
  <p>This is true across different versions of <code>iwyu</code>, including newer versions with <code>-Xiwyu --no_fwd_decls</code> added.</p>
  
  <p>Is this a mistake in <code>iwyu</code> or does the <code>C</code> standard want me to define the type before the <code>typedef</code>?</p>