This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tree dump system and scopes


Tiago Stein wrote:
need to be able to identify when a class (record) is inside any special
scope.

If you have trees, then the TYPE_CONTEXT field of a type, and the DECL_CONTEXT field of a decl, contains a pointer to the containing object or type.


There are some helper functions that you might find useful. See for instance get_containing_scope, decl_function_context, and decl_type_context.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]