[PATCH] CommandLineArgumentParser: handle single quotes.

Peter Collingbourne peter at pcc.me.uk
Fri Mar 1 01:52:17 PST 2013



Manuel Klimek <klimek at google.com> wrote:

>
>Why do we need this? I left that out by design. I'm open to arguments,
>though :)

Not in the strict sense of the word 'need', I suppose. We arguably don't need support for double quotes either as the generator could instead escape spaces.  I see this more as a matter of convenience for build systems which are already using single quotes and would rather not go through contortions just for clang's sake.  As well as being commonly used, the feature is easy to implement (easier than double quotes due to no escaping rules) which makes it a good candidate for support IMO.

(More concretely, this feature turned out to be necessary to support chromium's command lines).

>  If we decide we need this, I'd want us to handle escaping of ticks.

Do you mean, e.g. '\''? I don't see any mention of escaping of ticks in the POSIX spec (http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_02_02).

Thanks,
Peter




More information about the cfe-commits mailing list