[cfe-commits] [PATCH] Fixits for smart quotes and other Unicode characters

Jordan Rose jordan_rose at apple.com
Fri Aug 10 17:56:12 PDT 2012


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.

It may just be the cost of the extra indirection, but can anyone think of any additional ways to speed this up? It's a really nice way to show off, and would be much more friendly for people who accidentally copy-paste "code" with smart quotes in it.

Finally, even on my weak laptop the variation in time between runs is still larger than the actual difference between builds. Anyone have a truly grueling parsing test case that will exercise literals at a much faster rate? (Alternatively, does anyone have a really old machine I can SSH into? *grin*)

Thanks,
Jordan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Unicode.patch
Type: application/octet-stream
Size: 40329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120810/73568b52/attachment.obj>


More information about the cfe-commits mailing list