On Fri, Aug 10, 2012 at 5:56 PM, Jordan Rose <[email protected]> wrote:
> Hi, everyone. I've been working on and off on PR13178, which would provide > nice fixits and recovery for Unicode smart quotes and ellipses, and better > diagnosis of other spurious non-ASCII characters. I have all the > functionality in place, but see a dramatic (>5%) slowdown when parsing > Cocoa.h (-fsyntax-only). I've tried as much as I can to keep the > smart-quote-specific code out of the string literal loops, but certain > pieces just can't be avoided. I don't think we want this fixit at the cost > of the common correct case. > I suspect most of the extra cost here is coming from the "case '\xE2' in LexNextToken, not from the string literal lexing. Have you tried sinking that into the 'if ((Char & 0x80) != 0)' in the default case? That might also benefit from being marked as unlikely. I've not looked at the patch in detail yet. One thing I spotted in passing: your diagnostic messages should start with a lowercase letter.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
