<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 4, 2008, at 6:40 AM, Doug Gregor wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; 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: 0; "><blockquote type="cite">On Wed, Sep 3, 2008 at 2:36 PM, Ted Kremenek <<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>> wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">As a side note, my original interest in this code was to allow the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">parser+actions to be able to distinguish up front between enum/struct/<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">union/class forward declarations and definitions.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Doesn't already the parser+actions distinguish them ? ActOnTag gets passed a<br></blockquote><blockquote type="cite">TagKind which is one of TK_Definition/TK_Declaration/TK_Reference.<br></blockquote><br>I *think* Ted meant that he wants to be able to know before actually<br>parsing the struct-or-union-specifier (in C) whether it's going to<br>declare, define, or reference a tag. This can be done with just a<br>little bit of lookahead. In the C++ world, this would mean knowing<br>whether we're parsing a class-specifier or an<br>elaborated-type-specifier, and allow us to have different Parse<br>functions for these two nonterminals (which are actually quite<br>different, despite the ambiguity), rather than combining them into a<br>single ParseClassSpecifier (which is really<br>ParseClassSpecifierOrNonEnumElaboratedTypeSpecifier!).<br></span></blockquote></div><br><div>Argiris is correct.  My mind short-circuited.  I believe that the TagKind should be enough for ActOnTag to take the appropriate action based on a definition/declaration/reference.</div><div><br></div><div>Thanks everyone!</div></body></html>