problem to pass parameter to clang

Hi dear all,
I've found there is a problem to pass an Separate option with -Xclang
option, look the following example:
clang -Xclang -diagnostic-log-file debug.log -c test.cpp
this line will fail and the following line will be ok
clang -Xclang -diagnostic-log-file -Xclang debug.log -c test.cpp
-Xclang itself is a Separate option which can accept only one
parameter, so in the first line debug.log will
not be parsed as part of -diagnostic-log-file but as an input.
Any suggestion ? thanks in advance .

Hi Shang,

This is expected and by design.

Dmitri

I think this usage is strange and not straightforward. Will there be
improvement in future release ? Many thanks!

No, there will not be an improvement. -Xclang is an internal interface
that has been exposed to users with a lot of explicit warnings and caveats.
It is much better for it to have a simple, consistent specification than for
it to accumulate features (and so ambiguities) in the interest of being
easier to use. Anything that we actually want to be easy to use should
be exposed through a proper driver option instead.

John.

Thanks. Nice to see the direction.