[PATCH] CommandLineArgumentParser: handle single quotes.

Manuel Klimek klimek at google.com
Fri Mar 1 02:00:25 PST 2013


On Fri, Mar 1, 2013 at 10:52 AM, Peter Collingbourne <peter at pcc.me.uk>wrote:

>
>
> 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.
>

Good point.


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

How so?


>
> >  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
> ).
>

You're right. Ok, looks good to me then.

Thanks,
/Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130301/7544d501/attachment.html>


More information about the cfe-commits mailing list