Ping.<br><br><div class="gmail_quote">On Fri, Jun 29, 2012 at 12:49 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="gmail_quote"><div>On Fri, Jun 29, 2012 at 11:46 AM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


+      case ANK_TentativeDecl:<br>
+      case ANK_TemplateName:<br>
+        // These two shouldn't happen.<br>
+      case ANK_Unresolved:<br>
         break;<br>
<br>
assert?<br></blockquote><div><br></div></div><div>Sorry, I forgot to update that comment after some refactoring. The second case is possible (but only for ill-formed code), and the first case is completely harmless. I've updated and simplified this code to remove the switch entirely:</div>


<div><br></div><div><div>  case tok::identifier: {</div><div>    Token Next = NextToken();</div><div>    if (Next.is(tok::colon)) { // C99 6.8.1: labeled-statement</div><div>      // identifier ':' statement</div>


<div>      return ParseLabeledStatement(Attrs);</div><div>    }</div><div><br></div><div>    // Look up the identifier, and typo-correct it to a keyword if it's not</div><div>    // found.</div><div>    if (Next.isNot(tok::coloncolon)) {</div>


<div>      // CorrectionCandidateCallback by default allows typo-correction to</div><div>      // anything which can appear at the start of a statement.</div><div>      CorrectionCandidateCallback DefaultValidator;</div>

<div>
      if (TryAnnotateName(/*IsAddressOfOperand*/false, &DefaultValidator) </div><div>            == ANK_Error) {</div><div>        // Handle errors here by skipping up to the next semicolon or '}', and</div><div>


        // eat the semicolon if that's what stopped us.</div><div>        SkipUntil(tok::r_brace, /*StopAtSemi=*/true, /*DontConsume=*/true);</div><div>        if (Tok.is(tok::semi))</div><div>          ConsumeToken();</div>


<div>        return StmtError();</div><div>      }</div><div><br></div><div>      // If the identifier was typo-corrected, try again.</div><div>      if (Tok.isNot(tok::identifier))</div><div>        goto Retry;</div><div>


    }</div><div><br></div><div>    // Fall through</div><div>  }</div></div><div><br></div></div>
</blockquote></div><br>