This patch depends on http://reviews.llvm.org/D14191
Addressed review comments.
Though it's a less frequently used option, but seems to be good for consistency (with the clang tools' -extra-arg/-extra-arg-before pair of options) and for completeness. I've extended the test to verify both options and their interaction.
My concern is still with the Filename in the arg callback. I'd like to understand the full use-case better.
The thing is that they do depend on the file, because we're implementing their configuration from the config file, and different translation units can have different corresponding configuration files.
Ok, now I get it. I completely didn't expect an interface that needs a setCurrentFile so it can getOptions afterwards for that file.