Clang's frontend driver, `clang -cc1`, will only run one action at a time. If multiple action options  are specified, only the rightmost one is run . So in the following invocation, only `-dump-tokens` will be used:
clang -cc1 -ast-dump -dump-tokens file.c
Conversely, only `-ast-dump` will be run below:
clang -cc1 -dump-tokens -ast-dump file.c
No warning or error is issued, which is a bit counter-intuitive. Also, with one-action-at-a-time rule, only one type of information can be dumped per invocation (as in the example above). Is there any particular reason not to warn users (or to error out) when multiple actions are specified? And why not allow multiple "dump" options per invocation?
Flang's frontend driver exhibits similar behaviour - we've been discussing this on flang-dev . We've considered extending the `ArgList` API to for such scenarios (⚙ D111781 [flang] Make the frontend driver error out when requesting multiple actions), but I'm not sure whether that's the right approach. Also, I wanted to better understand the rationale in Clang first.
Thank you for reading!
 Options decorated with `Action_Group` in Options.td (llvm-project/Options.td at main · llvm/llvm-project · GitHub)
 llvm-project/CompilerInvocation.cpp at main · llvm/llvm-project · GitHub
 [flang-dev] [RFC] Frontend driver: action vs non-action options