[cfe-dev] How to iterate the members of AccessSpecDecl object.

Douglas Gregor dgregor at apple.com
Fri Feb 18 07:48:54 PST 2011


On Feb 18, 2011, at 2:57 AM, Talespin Kit wrote:

> How to get the source location of the AccessSpecifer using a CXXMethodDecl, 
> 
> or
> 
> using a AccessSpecDecl object how to traverse the members under it.


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).

	- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110218/ebbbe5f3/attachment.html>


More information about the cfe-dev mailing list