[cfe-commits] r164861 - in /cfe/trunk: bindings/xml/comment-xml-schema.rng tools/libclang/CXComment.cpp

Dmitri Gribenko gribozavr at gmail.com
Sun Sep 30 12:42:35 PDT 2012


On Sun, Sep 30, 2012 at 10:33 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
>
> On Sep 29, 2012, at 11:01 AM, Dmitri Gribenko wrote:
>
>> On Sat, Sep 29, 2012 at 8:54 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
>>>
>>> On Sep 29, 2012, at 1:26 AM, Dmitri Gribenko wrote:
>>>
>>>> On Sat, Sep 29, 2012 at 1:35 AM, Fariborz Jahanian <fjahanian at apple.com> wrote:
>>>>> +      StringRef distribution;
>>>>> +      if (AA->getPlatform()) {
>>>>> +        distribution = AA->getPlatform()->getName();
>>>>> +        if (distribution == "macosx")
>>>>> +          distribution = "OSX";
>>>>> +        else
>>>>> +          distribution = "iOS";
>>>>> +      }
>>>>
>>>> Do we need to do this translation here?  Why do we map everything that
>>>> is not "macosx" to "iOS"?
>>>
>>> Yes, translation is necessary. There are currently macosx and ios as allowed platforms in availability macros. I will probably check for "ios" and assert for anything else.
>>
>> I don't know if we should assert -- do we reject the attribute in
>> other cases or just emit a warning?  Maybe just fold all other
>> platform names to something like 'Unknown'?
>
> We warn for any other platform; as in:
> bad.cpp:2:60: warning: unknown platform 'unix' in availability macro [-Wavailability]
>
> Ok. I will add "OSUNKOWN"  to rhythm with iOS and OSX.

Yes, that was my intention -- if we just warn and don't reject the
source, then asking for documentation in such file seems to be a valid
request and we should not assert.

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-commits mailing list