[cfe-commits] [PATCH] Fast path for finding comments

Dmitri Gribenko gribozavr at gmail.com
Tue Jul 17 15:03:42 PDT 2012


On Tue, Jul 17, 2012 at 2:58 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
> On Jul 17, 2012, at 2:52 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>
>> On Tue, Jul 17, 2012 at 2:41 PM, Douglas Gregor <dgregor at apple.com> wrote:
>>>
>>> On Jul 12, 2012, at 9:44 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> The attached patch implements an optimization for finding the comment
>>>> that occurs just after a given declaration.  It is based on the
>>>> observation that during parsing the comment that should be attached to
>>>> the decl is usually among the last two documentation comments parsed.
>>>
>>> This approach looks good to me. Did you validate it on a decent-sized header (say, Cocoa) to make sure it doesn't change the results?
>>
>> I did -- and there is an assert checking that it doesn't change the result.
>
>
> Thanks!

Thank you for review!  Committed r160400.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list