How can I turn on the "dump" printing of the AST?

Hi guys,

I was wondering if there is any way to get this AST dump output into a file where I could see the whole output clearly. Is there any way to do this through command line.
I tried something like this but it did not work:
clang -cc1 -ast-dump filename.c -o filename


Try a redirection, e.g.

clang -cc1 -ast-dump filename.c >filename

It should work on Windows.