<br><br><div class="gmail_quote">On Wed, Oct 12, 2011 at 11:00 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div class="im"><div><div>On Oct 12, 2011, at 10:52 PM, David Blaikie wrote:</div><blockquote type="cite">This patch fixes <a href="http://llvm.org/bugs/show_bug.cgi?id=11109" target="_blank">pr11109</a>, a crash-on-invalid with the following source:<br>
<br>class foo { public<br><br>Matthias who reported the bug was nice enough to provide a basic fix (though only attached it to the bug rather than emailing cfe-commits, so it went unnoticed) but I've fixed up a few more things around here:<br>

<br>The original code was trying to consume the token following the access specifier, this is what caused the crash in the above case*. I assume the reason it was doing this was to catch the common case where a semicolon is written instead of a colon. So to address this I special cased that - FixIt replacing the semicolon with a colon (see class E in the attached test). But in the general case, consuming this token just lead to bad error recovery (see the comments for class D in the attached test) - "class foo { public int i; };" would fail once for the missing colon, then again for the missing type specifier for the declaration of 'i' because the 'int' had been erroneously consumed while looking for a colon).<br>

<br>Please let me know if this looks good and I'll check it in and resolve the bug,<br></blockquote></div><br></div><div>Looks great, thanks!</div></div></blockquote><div><br>Thanks John! Committed as r141852 & resolved the bug as fix.<br>
<br>- David<br></div></div>