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

Aaron Ballman aaron at aaronballman.com
Thu Oct 2 10:41:32 PDT 2014


On Thu, Oct 2, 2014 at 1:36 PM, jahanian <fjahanian at apple.com> wrote:
>
> On Oct 2, 2014, at 10:31 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
>
>> On Thu, Oct 2, 2014 at 1:19 PM, jahanian <fjahanian at apple.com> wrote:
>>>
>>> On Oct 2, 2014, at 10:13 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
>>>
>>>>
>>>> The comments are in this thread already, when you were asking for
>>>> pre-commit feedback on this change. To recap: VersionTuple needs to be
>>>> modified to remember which syntax was used, and provide tests (like
>>>> -ast-print in Misc) for ensuring the diagnostics and the pretty
>>>
>>>> printing are not broken (which they currently are). I don't believe
>>> pretty printing does not print availability attribute in my tests.
>>
>> test.cpp:
>> void f() __attribute__((availability(macosx,introduced=10_1,deprecated=10.2)));
>>
>> E:\llvm\2013>clang -cc1 -ast-print -o - "E:\Aaron Ballman\Desktop\test.cpp"
>> void f() __attribute__((availability(macosx, introduced=10.1,
>> deprecated=10.2)));
>>
>>> A Bugzilla ticket would be good to
>>> track this. About introducing the overhead into VersionTuple for this, I would like to hear more feedback though.
>>
>> I have filed one: http://llvm.org/bugs/show_bug.cgi?id=21133
>>
>> However, this was precommit feedback you received. If you disagreed
>> with it or needed further clarifications, that really should have been
>> discussed prior to committing your changes.
>
> Sorry about my shortcoming. I will tend to this if positive feedback (or even if no feedback) in a few days.

No worries! I just want to make sure it doesn't get lost, that's all
(which is why your Bugzilla suggestion was a good one). :-)

As for VersionTuple overhead, we may be able to get away with unsigned
Major : 31; unsigned UsesUnderscores : 1; without any additional
overhead (I have a hard time imagining a version large enough where
that would break existing code).

~Aaron



More information about the cfe-dev mailing list