[cfe-dev] Allowing '_' as version tuple separator?

jahanian fjahanian at apple.com
Thu Oct 2 10:01:42 PDT 2014


On Oct 1, 2014, at 9:57 AM, Aaron Ballman <aaron at aaronballman.com> wrote:

>> 
>> 
>> Parser::ParseVersionTuple(…) is where 'major[.minor[.subminor]]’ is parsed.
>> I am suggesting to modify it to recognize ‘_’ as separator. So, I propose to
>> change
>> Parser::ParseVersionTuple(…) to also accept ‘major[_minor[_subminor]]’
>> syntax as well.
>> As an example, I brought up an example of versioning in availability
>> attribute and showed
>> how this change will allow 10_1_0 as alternative version. Hope it is clear.
> 
> Thank you for the clarification! So long as VersionTuple remembers
> which form is used (period or underscore) so that it can be printed in
> diagnostics and pretty printed by attributes properly (with
> appropriate test coverage, of course), I am okay with this.

ObjC pretty printing has not been supported in a while and does not print “availability” attribute
at all. Diagnostic still uses ‘.’. Use of ‘_’ in availability attribute declaration is a notational convenience and
remembering it in AST imo does not justify cost vs. benefit.
In r218884.
- Fariborz

> 
> ~Aaron





More information about the cfe-dev mailing list