<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">The documentation of AccessSpecDecl says<br><br><span style="font-style: italic;">AccessSpecDecl - An access specifier followed by a colon</span> ':'.<br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">An objects of this class represents sugar for the syntactic occurence</span><br style="font-style: italic;"><span style="font-style: italic;">of an access specifier followed by a colon in the list of member</span><br style="font-style: italic;"><span style="font-style: italic;">specifiers of a C++ class definition.</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic; font-weight: bold;">Note that they do not repesent other uses of access specifiers,</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">such as
 those occuring in a list of base specifiers.</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">Also note that this class has nothing to do with so-called</span><br style="font-style: italic; font-weight: bold;"><span style="font-style: italic; font-weight: bold;">"access declarations" (C++98 11.3 [class.access.dcl]).</span><br><br>Does the documentation has to be updated. ?<br>--- On <b>Fri, 2/18/11, Douglas Gregor <i><dgregor@apple.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Douglas Gregor <dgregor@apple.com><br>Subject: Re: [cfe-dev] How to iterate the members of AccessSpecDecl object.<br>To: "Talespin Kit" <talespin_kit@yahoo.com><br>Cc: cfe-dev@cs.uiuc.edu<br>Date: Friday, February 18, 2011, 3:48 PM<br><br><div id="yiv1042481445"><br><div><div>On Feb 18, 2011, at 2:57 AM, Talespin Kit
 wrote:</div><br class="yiv1042481445Apple-interchange-newline"><blockquote type="cite"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">How to get the source location of the AccessSpecifer using a CXXMethodDecl, <br><br>or<br><br>using a AccessSpecDecl object how to traverse the members under it.<br></td></tr></tbody></table></blockquote></div><div><br></div><div>Just walk through the members of the class declaration (i.e., a CXXRecordDecl) with decls_begin()/decls_end(), which come in source order. When you see an AccessSpecDecl, make that the "current" access specification decl, which specifies the access of all of the declarations that follow (until the next AccessSpecDecl, of course).</div><br><div><span class="yiv1042481445Apple-tab-span" style="white-space: pre;">       </span>- Doug</div></div></blockquote></td></tr></table><br>