In reply to this post by Eric Fiselier via cfe-dev
David Blaikie writes:
> If it actually does the same thing as GCC's -fdirectives-only, I'd be happy
> to review a patch to provide that as an alias.
No, they are quite different. GCC's -fdirectives-only expands all the
directives (#ifdef, #warning, etc) while Clang's -frewrite-includes only
expands #include's (it still evaluates #ifdef, etc but does not eliminate
branches not taken).
With GCC you will also need to pass -fdirectives-only to the compilation
stage while with Clang you treat it as a normal source file (so may need
-x c/c++ if compiling as .i/.ii).