Haven't yet done a full review, sorry for the delays, but wanted to ask one question that jumped out at me. Maybe you can explain and save me the trouble of tracking it down.<br><br><div class="gmail_quote">On Tue, Jan 31, 2012 at 1:41 AM, James Molloy <span dir="ltr"><<a href="mailto:james.molloy@arm.com">james.molloy@arm.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is due to a hack in the parser that hangs such tags on the translation unit because no proper declcontext is available at that point. I've modified my code so it catches this and unhooks them from the translation unit, so they don't get visited twice and the output is better.</blockquote>
</div><br><div>It would seem more clean to go in and fix the code that attaches these to the translation unit to not do so? The current pattern seems very inconsistent. It also means we're mutating the AST in weird ways. That makes me nervous. I'd essentially like to see far fewer conditionals when handling these declarations. We should be able to unconditionally set up the lexical context, attach to the function, and push onto the scope... If there are conditions on these steps, I would benefit from comments documenting why we don't have consistent behavior...</div>