<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Implemented in r185724:</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);">/**</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * <span style="color: #004c14">\brief</span> Given a cursor that represents an ObjC method or property declaration,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * return non-zero if the declaration was affected by "@optional".</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> * Returns zero if the cursor is not such a declaration or it is "@required".</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"> */</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><span style="color: #78492a">CINDEX_LINKAGE</span> <span style="color: #bb2ca2">unsigned</span> clang_Cursor_isObjCOptional(<span style="color: #4f8187">CXCursor</span> C);</div></div><div><br></div><br><div><div>On Jun 19, 2013, at 7:52 AM, Muhammad Hussein Nasrollahpour <<a href="mailto:iapplechocolate@me.com">iapplechocolate@me.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">There is no API for accessing optional/required properties. The only thing it offers is <span style="font-family: Menlo; font-size: 15px;"> <span class="Apple-converted-space"> </span></span><font face="Menlo" color="#004d65" style="font-size: 13px;">CXCursor_ObjCPropertyDecl</font><font face="Menlo" color="#004d65" style="font-size: 15px;">.<span class="Apple-converted-space"> </span></font><font style="font-size: 13px;">But in Protocol we can have both optional/required properties. So there is still lack of API.</font><div><br></div><div><font face="Menlo"><span style="font-size: 15px;">@protocol protocol1 <NSObject></span></font></div><div><font face="Menlo"><span style="font-size: 15px;">@optional</span></font></div><div><font face="Menlo"><span style="font-size: 15px;">@property (readonly) NSString *string1;</span></font></div><div><span style="font-size: 15px; font-family: Menlo;"><br></span></div><div><span style="font-size: 15px; font-family: Menlo;">@required</span></div><div><span style="font-size: 15px; font-family: Menlo;">@property (readonly) NSString *string2;</span></div><div><font face="Menlo"><span style="font-size: 15px;">@end</span></font></div>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a></div></blockquote></div><br></body></html>