<html><head><base href="x-msg://1627/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 23.06.2011, at 13:25, harsh gupta wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; "><div dir="ltr"><div><div dir="ltr">Is it possible to get the information about the members of a struct from the TagDecl for that struct.<span class="Apple-converted-space"> </span><br><br>for example i have :<br>struct foo{<br>int x;<br>char y;<br>};<br><br>Here how can i find out that the struct has a member of type int and another of type char.<br></div></div></div></div></span></blockquote></div><br><div>First, you cast the TagDecl to a RecordDecl. Then you can iterate over its FieldDecls.</div><div><br></div><div>Sebastian</div></body></html>