<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Committed in r234762, thanks!</div><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 1, 2015, at 3:38 PM, Loïc Jaquemet <<a href="mailto:loic.jaquemet@gmail.com" class="">loic.jaquemet@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span 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; float: none; display: inline !important;" class="">Hi,</span><br 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;" class=""><span 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; float: none; display: inline !important;" class="">this is still the same patch as in 2013,</span><br 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;" class=""><br 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;" class=""><span 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; float: none; display: inline !important;" class="">Updated for r233836</span><br 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;" class=""><br 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;" class=""><span 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; float: none; display: inline !important;" class="">Would someone be able to commit it at last ?</span><br 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;" class=""><br 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;" class=""><br 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;" class=""><span 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; float: none; display: inline !important;" class="">$ nosetests .</span><br 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;" class=""><span 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; float: none; display: inline !important;" class="">.LIBCLANG TOOLING ERROR: json-compilation-database: Error while</span><br 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;" class=""><span 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; float: none; display: inline !important;" class="">opening JSON database: No such file or directory</span><br 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;" class=""><br 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;" class=""><span 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; float: none; display: inline !important;" class="">.................................................................................................</span><br 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;" class=""><span 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; float: none; display: inline !important;" class="">----------------------------------------------------------------------</span><br 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;" class=""><span 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; float: none; display: inline !important;" class="">Ran 98 tests in 1.554s</span><br 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;" class=""><br 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;" class=""><span 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; float: none; display: inline !important;" class="">OK</span><br 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;" class=""><br 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;" class=""><span 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; float: none; display: inline !important;" class="">llvm[0]: ***** Completed Release+Asserts Build</span><br 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;" class=""><span 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; float: none; display: inline !important;" class="">$ make check-all</span><br 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;" class=""><span 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; float: none; display: inline !important;" class="">llvm[0]: Running test suite</span><br 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;" class=""><span 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; float: none; display: inline !important;" class="">Testing Time: 136.64s</span><br 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;" class=""><span 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; float: none; display: inline !important;" class=""> Expected Passes    : 21027</span><br 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;" class=""><span 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; float: none; display: inline !important;" class=""> Expected Failures  : 122</span><br 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;" class=""><span 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; float: none; display: inline !important;" class=""> Unsupported Tests  : 99</span><br 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;" class=""><br 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;" class=""><br 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;" class=""><br 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;" class=""><br 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;" class=""><br 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;" class=""><br 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;" class=""><span 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; float: none; display: inline !important;" class="">2015-02-11 18:34 GMT-07:00 Loïc Jaquemet <</span><a href="mailto:loic.jaquemet@gmail.com" 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;" class="">loic.jaquemet@gmail.com</a><span 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; float: none; display: inline !important;" class="">>:</span><br 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;" class=""><blockquote type="cite" 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;" class="">Updated for r228880<br class=""><br class="">2015-01-30 19:13 GMT-07:00 Loïc Jaquemet <<a href="mailto:loic.jaquemet@gmail.com" class="">loic.jaquemet@gmail.com</a>>:<br class=""><blockquote type="cite" class="">+ Removed the useless default that creates a warning.<br class="">+ cleaned some whitespaces<br class=""><br class="">Testing Time: 127.86s<br class=""> Expected Passes    : 20169<br class=""> Expected Failures  : 103<br class=""> Unsupported Tests  : 88<br class=""><br class="">2015-01-29 19:08 GMT-07:00 Loïc Jaquemet <<a href="mailto:loic.jaquemet@gmail.com" class="">loic.jaquemet@gmail.com</a>>:<br class=""><blockquote type="cite" class="">my bad,<br class=""><br class="">I was using make check instead of make check-all<br class=""><br class="">the TU is fixed in the patch attached (2 modifs in print-type.cpp )<br class=""><br class="">$ ./Release+Asserts/bin/llvm-lit ~/llvm/tools/clang/test/Index/<br class="">[..]<br class="">Testing Time: 5.49s<br class=""> Expected Passes    : 239<br class="">$<br class=""><br class=""><br class="">$ make check-all<br class="">llvm[0]: Running test suite<br class="">[..]<br class="">Testing Time: 127.90s<br class=""> Expected Passes    : 20158<br class=""> Expected Failures  : 101<br class=""> Unsupported Tests  : 88<br class=""><br class=""><br class=""><br class="">2015-01-29 18:22 GMT-07:00 Loïc Jaquemet <<a href="mailto:loic.jaquemet@gmail.com" class="">loic.jaquemet@gmail.com</a>>:<br class=""><blockquote type="cite" class="">Apparently it was reverted in r227472<br class=""><br class="">2015-01-29 5:49 GMT-07:00 Francois Pichet <<a href="mailto:pichet2000@gmail.com" class="">pichet2000@gmail.com</a>>:<br class=""><blockquote type="cite" class="">I committed in r227432, thanks.<br class=""><br class="">On Wed, Jan 28, 2015 at 5:18 PM, Argyrios Kyrtzidis <<a href="mailto:kyrtzidis@apple.com" class="">kyrtzidis@apple.com</a>><br class="">wrote:<br class=""><blockquote type="cite" class=""><br class="">Yes, I think it’s good to go, thanks Loïc!<br class=""><br class=""><br class="">On Jan 28, 2015, at 1:06 PM, Francois Pichet <<a href="mailto:pichet2000@gmail.com" class="">pichet2000@gmail.com</a>> wrote:<br class=""><br class="">Hi, since your patch is just a rebasing of something that was already<br class="">reviewed, I think you can go ahead and commit..<br class="">any objection?<br class=""><br class="">On Tue, Jan 27, 2015 at 7:36 PM, Loïc Jaquemet <<a href="mailto:loic.jaquemet@gmail.com" class="">loic.jaquemet@gmail.com</a>><br class="">wrote:<br class=""><blockquote type="cite" class=""><br class="">Hi,<br class=""><br class="">would it be possible to get a review for this patch (libclang/python<br class="">bindings) ?<br class=""><br class="">Thanks<br class=""><br class="">2015-01-21 19:00 GMT-07:00 Loïc Jaquemet <<a href="mailto:loic.jaquemet@gmail.com" class="">loic.jaquemet@gmail.com</a>>:<br class=""><blockquote type="cite" class="">Please find this patches updated for .226743.<br class=""><br class=""><br class="">* libclang: Add three functions useful for dealing with anonymous<br class="">fields.<br class="">+clang_Cursor_getOffsetOfField<br class="">+clang_Cursor_isAnonymous<br class="">+clang_Type_visitFields<br class="">Fixed: reuse CXVisitorResult instead of introducing a new enum<br class=""><br class="">* Python; Add corresponding methods for dealing with anonymous fields.<br class=""><br class="">* TU in print-type<br class="">adds [nbFields] in c-index-test for records<br class="">for anonymous record, shows offset of field in anonymous and parent<br class="">record. ( clang_Type_getOffsetOf/clang_Cursor_getOffsetOfField)<br class=""><br class="">LLVM tests passes<br class="">python tests passees<br class=""><br class=""><br class="">* Reference from 2013/2014<br class=""><br class=""><a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140217/099453.html" class="">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140217/099453.html</a><br class=""><br class="">2015-01-21 12:28 GMT-07:00 Francois Pichet <pichet2000@gmail.com>:<br class=""><blockquote type="cite" class="">Hi Loic,<br class=""><br class="">Seems like this was never committed in trunk?  Any reason why?<br class="">I have a project with a  lot of anonymous struct and this patch would<br class="">be<br class="">useful.<br class=""><br class="">On Thu, Feb 20, 2014 at 2:40 AM, Argyrios Kyrtzidis<br class=""><kyrtzidis@apple.com><br class="">wrote:<br class=""><blockquote type="cite" class=""><br class=""><br class="">On Feb 16, 2014, at 11:49 AM, Loïc Jaquemet <loic.jaquemet@gmail.com><br class="">wrote:<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class="">+/**<br class="">+ * \brief Visitor invoked for each field found by a traversal.<br class="">+ *<br class="">+ * This visitor function will be invoked for each field found by<br class="">+ * clang_visitCursorFields(). Its first argument is the cursor<br class="">being<br class="">+ * visited, its second argument is the client data provided to<br class="">+ * clang_visitCursorFields().<br class="">+ *<br class="">+ * The visitor should return one of the \c CXFieldVisitResult<br class="">values<br class="">+ * to direct clang_visitCursorFields().<br class="">+ */<br class="">+typedef enum CXFieldVisitResult (*CXFieldVisitor)(CXCursor C,<br class="">+                                                  CXClientData<br class="">client_data);<br class=""><br class="">+CINDEX_LINKAGE unsigned clang_Type_visitFields(CXType T,<br class="">+                                               CXFieldVisitor<br class="">visitor,<br class="">+                                               CXClientData<br class="">client_data);<br class=""><br class="">In general, the visitor is not recursing, right ? In that case why<br class="">not<br class="">use a simpler "getNumFields / getField" pair of functions ?<br class=""></blockquote><br class="">Well, the source code (AST.Decl.h ) exposes a iterator on its<br class="">fields.<br class="">Given that in other similar cases a visitor is used, I did the<br class="">same.<br class=""><br class="">I did not want to introduce new code/new logic.<br class="">I just want to expose the iterator.<br class=""><br class="">Do you want me to change it to a "getNumFields / getField" pair of<br class="">functions ?<br class=""></blockquote><br class="">I see, the visitor interface is fine.<br class=""><br class=""><blockquote type="cite" class=""><br class=""><br class=""><blockquote type="cite" class="">+enum CXFieldVisitResult {<br class=""><br class="">Could you reuse CXVisitorResult instead of introducing a new enum<br class="">?<br class=""></blockquote><br class="">Yes. I did not see that one.<br class="">Will change that.<br class=""></blockquote><br class="">After that, LGTM!<br class=""><br class=""><blockquote type="cite" class=""><br class=""><br class=""><blockquote type="cite" class=""><br class=""><br class="">On Feb 10, 2014, at 5:13 PM, Loïc Jaquemet<br class=""><loic.jaquemet@gmail.com><br class="">wrote:<br class=""><br class=""><blockquote type="cite" class="">Hi,<br class=""><br class="">I'm pinging back about this patch :<br class="">* libclang: Add three functions useful for dealing with anonymous<br class="">fields.<br class="">+clang_Cursor_getOffsetOfField<br class="">+clang_Cursor_isAnonymous<br class="">+clang_Type_visitFields<br class=""><br class="">Currently, there is no function in libclang to access clang logic<br class="">that<br class="">handles anonymous members in a record.<br class=""><br class="">Given the current API , there is no direct method to :<br class="">a) recover the offset of an anonymous field.<br class="">- displayname == spelling == '', clang_Type_getOffset does not<br class="">work<br class="">+ new clang_Cursor_getOffsetOfField will expose that information<br class="">b) clearly identify that DECL as an anonymous record.<br class="">+ new clang_Cursor_isAnonymous will expose that information<br class=""><br class="">When using clang_visitChildren, an anonymous member will be<br class="">returned<br class="">as a STRUCT_DECL/UNION_DECL.<br class="">Currently the libclang user has to re-implement the logic to<br class="">differentiate FIELD_DECL in the list of children nodes<br class="">For example,<br class=""><br class="">struct A {<br class="">struct {int a;} typeanon;<br class="">struct {<br class=""> int bariton;<br class=""> union {<br class="">   int foo;<br class="">   int foo2;<br class=""> };<br class="">};<br class="">int c;<br class="">} ;<br class=""><br class="">Some children are STRUCT_DECL, some are FIELD_DECL, some are<br class="">attributes.<br class="">Worse,<br class="">children[0] == STRUCT_DECL (struct {int a;})<br class="">children[1] == FIELD_DECL (typeanon)<br class="">children[2] == STRUCT_DECL (anonymous structure)<br class="">children[3] == FIELD_DECL (int c)<br class=""><br class="">Sometime a STRUCT_DECL is a field (children[2]) sometimes it is<br class="">just a<br class="">STRUCT_DECL.<br class=""><br class="">The  new function clang_Type_visitFields will expose the existing<br class="">libclang capabilities to list only fields, and not all children<br class="">node,<br class="">as does clang_visitChildren.<br class=""><br class="">fields[0] == FIELD_DECL (first structure - typeanon)<br class="">fields[1] == FIELD_DECL (second anonymous structure)<br class="">fields[2] == FIELD_DECL (int c)<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">--<br class="">Loïc Jaquemet<br class=""><libclang-visit-fields.201116><br class=""></blockquote><br class=""></blockquote><br class=""><br class=""><br class="">--<br class="">Loïc Jaquemet<br class=""></blockquote><br class=""><br class="">_______________________________________________<br class="">cfe-commits mailing list<br class="">cfe-commits@cs.uiuc.edu<br class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br class=""></blockquote><br class=""><br class=""></blockquote><br class=""><br class=""><br class="">--<br class="">Loïc Jaquemet<br class=""></blockquote><br class=""><br class=""><br class="">--<br class="">Loïc Jaquemet<br class=""></blockquote><br class=""><br class=""></blockquote><br class=""></blockquote><br class=""><br class=""><br class="">--<br class="">Loïc Jaquemet<br class=""></blockquote><br class=""><br class=""><br class="">--<br class="">Loïc Jaquemet<br class=""></blockquote><br class=""><br class=""><br class="">--<br class="">Loïc Jaquemet<br class=""></blockquote><br class=""><br class=""><br class="">--<br class="">Loïc Jaquemet<br class=""></blockquote><br 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;" class=""><br 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;" class=""><br 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;" class=""><span 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; float: none; display: inline !important;" class="">--<span class="Apple-converted-space"> </span></span><br 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;" class=""><span 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; float: none; display: inline !important;" class="">Loïc Jaquemet</span><br 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;" class=""><span id="cid:C7D6D7C3-242E-43F6-B608-6D373B083CC4@apple.com"><201501-visit-fields.r233836></span></div></blockquote></div><br class=""></body></html>