OMP Nodes Skipped over in AST for -ast-dump=json

Hi all,

I am attempting to print out the json format using clang’s -ast-dump option. I am additionally passing in the -fopenmp flag so that the command looks like the following:
clang -Xclang -ast-dump=json -Xpreprocessor -fopenmp

If the -ast-dump option is run WITHOUT the json specification, all works well and all nodes are printed out (see ast_orig_temp.txt file). However, when the -ast-dump is run WITH the json specification, OMP Clauses nodes disappear (note that all other nodes I’ve checked do appear - see ast_json_temp.json file).

Any input or insight into why this is happening? The end goal here is to get the JSON representation of the Clang AST with OMP nodes, so if there is another way to accomplish this that would be useful as well.

Thanks for all the help - Joshua

ast_org_temp.txt (114 KB)

ast_json_temp.json (584 KB)

I would assume a certain type of visitor interface is not
implemented for OpenMP AST nodes, which one, I don't know.

Alexey might be able to help, or ask on the cfe-dev list.

~ Johannes