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

Dmitri Gribenko gribozavr at gmail.com
Thu Jul 12 09:44:22 PDT 2012


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.

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>*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find-comment-fast-path-v1.patch
Type: application/octet-stream
Size: 1808 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120712/124ed4ba/attachment.obj>


More information about the cfe-commits mailing list