title: How to make clang -E omit precompiled header
body: <p>PrecompiledHeader.h:</p>
  
  <pre><code>#include "stdio.h"
  </code></pre>
  
  <p>main.cpp:</p>
  
  <pre><code>#include "PrecompiledHeader.h"
  #include "stdio.h"
  
  int main()
  {
     return 123;
  }
  </code></pre>
  
  <p>Creating precompiled header:</p>
  
  <pre><code>clang -x c++-header PrecompiledHeader.h -o PrecompiledHeader.pch
  </code></pre>
  
  <p>Running clang preprocessor on main.cpp:</p>
  
  <pre><code>clang main.cpp -include-pch PrecompiledHeader.pch -E 
  </code></pre>
  
  <p>This currently outputs many many many pages of output (stdio.h). However, what I would like to get is only the main function,  and have the contents of PrecompiledHeader.h be omitted from the output.</p>
  
  <p>Is there any way to make clang do this?   (if someone knows the answer to the same question for visualstudio's cl.exe I'd love to know about it too :)</p>