[cfe-dev] problem to pass parameter to clang

Shang Yu yusunn at gmail.com
Wed Jul 18 17:21:28 PDT 2012


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

2012/7/19 Dmitri Gribenko <gribozavr at gmail.com>:
> On Wed, Jul 18, 2012 at 5:12 PM, Shang Yu <yusunn at gmail.com> wrote:
>> 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
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-dev mailing list