[cfe-commits] r165039 - in /cfe/trunk: bindings/xml/comment-xml-schema.rng test/Index/Inputs/CommentXML/valid-deprecated-attr.xml test/Index/Inputs/CommentXML/valid-unavailable-attr.xml test/Index/annotate-comments-availability-attrs.cpp test/Index/comment-xml-schema.c tools/libclang/CXComment.cpp
jahanian
fjahanian at apple.com
Tue Oct 2 15:08:41 PDT 2012
On Oct 2, 2012, at 1:18 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
> On Oct 2, 2012, at 1:05 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
>
>> Author: fjahanian
>> Date: Tue Oct 2 15:05:47 2012
>> New Revision: 165039
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=165039&view=rev
>> Log:
>> [Doc parsing]: Add available and deprecated attribute info
>> to XML output. // rdar://12378879
>
>> Added:
>> cfe/trunk/test/Index/Inputs/CommentXML/valid-deprecated-attr.xml
>> cfe/trunk/test/Index/Inputs/CommentXML/valid-unavailable-attr.xml
>> Modified:
>> cfe/trunk/bindings/xml/comment-xml-schema.rng
>> cfe/trunk/test/Index/annotate-comments-availability-attrs.cpp
>> cfe/trunk/test/Index/comment-xml-schema.c
>> cfe/trunk/tools/libclang/CXComment.cpp
>>
>> Modified: cfe/trunk/bindings/xml/comment-xml-schema.rng
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/xml/comment-xml-schema.rng?rev=165039&r1=165038&r2=165039&view=diff
>> ==============================================================================
>> --- cfe/trunk/bindings/xml/comment-xml-schema.rng (original)
>> +++ cfe/trunk/bindings/xml/comment-xml-schema.rng Tue Oct 2 15:05:47 2012
>> @@ -82,6 +82,12 @@
>> <zeroOrMore>
>> <ref name="Availability" />
>> </zeroOrMore>
>> + <zeroOrMore>
>> + <ref name="Deprecated" />
>> + </zeroOrMore>
>> + <zeroOrMore>
>> + <ref name="Unavailable" />
>> + </zeroOrMore>
>> <optional>
>> <ref name="ResultDiscussion" />
>> </optional>
>> @@ -313,13 +319,23 @@
>> </element>
>> </optional>
>> <optional>
>> - <element name="Unavailable">
>> - <data type="boolean" />
>> - </element>
>> + <ref name="Unavailable" />
>> </optional>
>> </element>
>> </define>
>>
>> + <define name="Deprecated">
>> + <element name="Deprecated">
>> + <data type="boolean" />
>> + </element>
>> + </define>
>> +
>> + <define name="Unavailable">
>> + <element name="Unavailable">
>> + <data type="boolean" />
>> + </element>
>> + </define>
>> +
>
> I don't think we need the boolean; the presence of <Deprecated> or <Unavailable> says that it's deprecated or unavailable.
>
> Also, shouldn't this include an optional message? That could be the content of the <Deprecated> or <Unavailable> tag.
clang allows message in deprecated/unavailable. GCC (4.2) does not. Looks like clang has extended use of these attributes.
I wasn't aware of clang's extension so I did not look for a message text.
- Fariborz
More information about the cfe-commits
mailing list