<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">How do we want to proceed with DeclGroups?  From my offline conversations my understanding is that we plan on going ahead with DeclGroups.<br><div><br><div><div>On Jan 6, 2009, at 10:09 PM, Zhongxing Xu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Wed, Jan 7, 2009 at 12:45 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div style=""><div><div class="Ih2E3d"><div>On Jan 6, 2009, at 7:14 PM, Zhongxing Xu wrote:</div></div><blockquote type="cite"><div class="gmail_quote"><div class="Ih2E3d">On Wed, Jan 7, 2009 at 10:33 AM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com" target="_blank">dgregor@apple.com</a>></span> wrote:</div> <div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> My hunch is that what we want is to find a way to iterate through a DeclContext in a way that allows us to see the DeclGroups (or, at least, see the syntactic relationship between "struct s { }" and "s_t"). However, I'd like to hear your thoughts on these ownership and representation issues.<br> <br>        - Doug<br> </blockquote></div></div><div class="Ih2E3d"><br>Hi Doug,<br><br>I'll take a deep look at all the DeclContext stuff and mechanism in the following days. But my feeling is that DeclContext should be the ultimate solution to the ownership problem. I'll wait for your progress in this area.</div> </blockquote><div><br></div><div>I'll try to get this done sooner rather than later. There is documentation on DeclContexts here:</div><div><br></div><div><span style="white-space: pre;">    </span><a href="http://clang.llvm.org/docs/InternalsManual.html#DeclContext" target="_blank">http://clang.llvm.org/docs/InternalsManual.html#DeclContext</a></div> </div></div></blockquote><div><br>Thanks.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><div><a href="http://clang.llvm.org/docs/InternalsManual.html#DeclContext" target="_blank"></a></div> <div class="Ih2E3d"><div><br></div><blockquote type="cite"><br>On the other hand, as you said, we still need a mechanism to recover the original syntax structure of the source (and more ideally, the layout of the source code). I think the DeclGroup could play that role with the following structure:<br>                       DeclGroup => TypeSpecifier Decls<br><br>Instead of owning the decls, the DeclGroup and TypeSpecifier could only refer to the decls with a pointer.</blockquote><div><br></div></div><div>Yes, I agree. </div> <div class="Ih2E3d"><br><blockquote type="cite"><br>Also the TopLevelDecls in TranslationUnit probably could be kept to reflect the code layout?<br></blockquote><br></div></div><div>We shouldn't need it. A DeclContext's list of declarations (accessible via decls_begin/decls_end) contains all of the declarations in the order they occur within the source code, which is the same information that TopLevelDecls tries to capture now. </div> </div></blockquote><div><br>OK.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div></div><div><br></div><div><span style="white-space: pre;">  </span>- Doug<br> </div><br></div></blockquote></div><br> _______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></div></body></html>