how to do an AST-dump of a cpp file

when i dump the AST of a cpp file using clang,

i get the AST of the preprocessed cpp file, which can be huge.

so i’d like to know if clang has an option to disable dump

AST of the included header files.

I think that Clang needs to be able to parse your code in order to
build the AST, which it won't be able to do without the headers. I
might be wrong though.

You can use -ast-dump-filter to dump a subset of the ast.