[cfe-commits] Improve performance of SkipBCPLComment()

Chris Lattner clattner at apple.com
Wed Aug 18 10:50:35 PDT 2010


On Aug 18, 2010, at 10:37 AM, Sean Hunt wrote:

> On 08/18/2010 11:25 AM, Peter Davies wrote:
>> I've optimized SkipBCPLComment() to find the first newline character
>> and then backtrack.
>> 
>> Peter
> 
> You shouldn't skip whitespace when backtracking; only a backslash 
> immediately followed by a newline indicates a continuation.

Clang skips horizontal whitespace after the backslash before the newline for GCC compatibility.

I'd also be interested in concrete performance measurements.

-Chris





More information about the cfe-commits mailing list