<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><base href="cid:59B18635-A0B3-4C49-A235-E0253F3F81A3@apple.com">Hi Andy,<div><br><div><div>On Jan 1, 2009, at 11:20 AM, Andrew Sutton wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Is the TemplateDecl getting returned all the way through to ParseExternalDeclaration? That's how declarations get back to the<div class="Ih2E3d">
</div></blockquote><div><br>Knowing that helps a *lot*. Here's iteration n + 1. This starts to add -ast-print support for class templates, but it doesn't print template parameters just yet. You'll get "template <...> Read top-level tag...".<br></div></div></blockquote><div><br></div><div>Sorry for the *long* delay... it's about time for us to get rolling on templates, eh?</div><br><blockquote type="cite"><div class="gmail_quote"><div>Getting this to work is... not very pretty. It's actually pretty tough to push the TemplateDecl all the way up to ParseExternalDeclaration since, somewhere in the call sequence, the created declaration node is wrapped in a DeclSpec (in ParseDeclarationOrFunctionDefinition IIRC) and ActOnTag only returns a TagDecl. I modified ActOnTag to return *either* a TagDecl or a TemplateDecl. This has the unfortunate side-effect of requiring you to think about DeclTy's in the Action interface as either a Tag or Template. It's easy to get the Tag from the Template, but unfortuntely you still have to perform the cast (so far only in 3 places). This also means that I'm setting the TypeRep of a DeclSpec as a TemplateDecl, which may or may not have unseen consequences down the road.<br></div></div></blockquote><div><br></div><div>Hrm. I'm not thrilled with this, especially since it's only really there to make the TemplateDecl get up to ParseExternalDeclaration. I left off this part of the patch, which we can revisit later when we need it. DeclSpecs shouldn't refer to templates at all, and the DeclSpec itself won't even be used for anything.</div><br><blockquote type="cite"><div class="gmail_quote"><div>It's a big patch, but I tried to make it as unintrusive as possible. Best of all, it doesn't cause any regressions on my system.</div></div></blockquote><div><br></div><div>... and, after resolving all of the conflicts from a month of development, no regressions on my system, either. Yay!</div><div><br></div><div>I've committed this patch, here:</div><div><br></div><div>  <a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090202/011754.html">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090202/011754.html</a></div><div><br></div><div>Thanks!</div><div><br></div><div>  - Doug</div></div></div></body></html>